Add part counter and time gestion simplier

This commit is contained in:
Gregory Trolliet 2020-02-12 10:02:24 +01:00
parent 7dd756ab6a
commit ca17cc3ce2
2 changed files with 71 additions and 29 deletions

View file

@ -2,7 +2,14 @@
\ProvidesPackage{formationTitle}[2019/10/01 v.0.4.0 a formation title
Gregory Trolliet]
\usepackage{geometry}
\usepackage[a4paper, landscape]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enumerate}
\usepackage{numprint}
\usepackage{graphicx}
\usepackage[pdfusetitle]{hyperref}
\usepackage[dvipsnames,table]{xcolor}
@ -57,6 +64,42 @@ not set, please fix this.}
\newcommand*{\room}[1]{\gdef\@room{#1}%
}
\newcounter{PartCounter}
\newcommand*{\partCount}{%
\stepcounter{PartCounter}%
\arabic{PartCounter}%
}
\newcounter{HourCounter}
\newcounter{MinuteCounter}
\newcommand{\startTime}[2]{%
\gdef\startHour{#1}
\setcounter{HourCounter}{\value{\startHour}}
\addtocounter{MinuteCounter}{ 2 }
}
\newcommand*{\printTime}{%
\ifnum\value{HourCounter}<10%
{}0%
\fi%
\arabic{HourCounter}h%
\ifnum\value{MinuteCounter}<10%
{}0%
\fi%
\arabic{MinuteCounter}%
}
\newcommand*{\partDuration}[1]{
\printTime{} (#1')%
\addtocounter{MinuteCounter}{#1}
\ifnum\value{MinuteCounter}>59
\stepcounter{HourCounter}
\addtocounter{MinuteCounter}{-60}
\fi
}
\newcommand*{\messagesTitle}[1]{\gdef\@messagesTitle{\textbf{#1}}%
}
\newcommand*{\@messagesTitle}{\textbf{Messages}}
@ -140,7 +183,10 @@ not set, please fix this.}
{
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{p{0.04\textwidth}|p{.09\textwidth}p{.18\textwidth}p{.3\textwidth}p{.18\textwidth}p{.13\textwidth}}
\begin{longtable}{p{0.01\textwidth}p{0.035\textwidth}|p{.09\textwidth}p{.17\textwidth}p{.28\textwidth}p{.17\textwidth}p{.13\textwidth}}
\makecell[l]{
\textbf{N\ensuremath{^\circ}}
} &
\makecell[l]{
\textbf{\dumblang{Hour}{Heure}} \\
(\dumblang{Time}{Durée})