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 \ProvidesPackage{formationTitle}[2019/10/01 v.0.4.0 a formation title
Gregory Trolliet] 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} \usepackage[dvipsnames,table]{xcolor}
@ -57,6 +64,42 @@ not set, please fix this.}
\newcommand*{\room}[1]{\gdef\@room{#1}% \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}[1]{\gdef\@messagesTitle{\textbf{#1}}%
} }
\newcommand*{\@messagesTitle}{\textbf{Messages}} \newcommand*{\@messagesTitle}{\textbf{Messages}}
@ -140,7 +183,10 @@ not set, please fix this.}
{ {
\setlength\LTleft{0pt} \setlength\LTleft{0pt}
\setlength\LTright{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]{ \makecell[l]{
\textbf{\dumblang{Hour}{Heure}} \\ \textbf{\dumblang{Hour}{Heure}} \\
(\dumblang{Time}{Durée}) (\dumblang{Time}{Durée})

View File

@ -4,14 +4,6 @@
\usepackage[english]{formationTitle} \usepackage[english]{formationTitle}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{enumerate}
\usepackage{numprint}
\usepackage{graphicx}
\usepackage[pdfusetitle]{hyperref}
\context{Super society} \context{Super society}
\title{Formation plan} \title{Formation plan}
\subject{My wonderful formation} \subject{My wonderful formation}
@ -21,6 +13,8 @@
\hour{10h00} \hour{10h00}
\place{Super building, Oceania} \place{Super building, Oceania}
\room{room 101} \room{room 101}
\setcounter{HourCounter}{10}
\setcounter{MinuteCounter}{0}
\objectives{ \objectives{
\begin{itemize} \begin{itemize}
@ -41,28 +35,30 @@
\newgeometry{right=1cm, left=1cm} \newgeometry{right=1cm, left=1cm}
\steptable{ \steptable{
\partCount
10h00 (5') & & \partDuration{5}
Welcome & & Welcome
Provide guidance & & Provide guidance
Present the association, the active learning & & Present the association, the active learning
& &
Flap \\ & Flap \\
\hline \hline
\pause \pause
10h05 (5') &
Organization presentation & & \partDuration{10}
Lecture style & & Organization presentation
& & Lecture style
Orally & &
-- \\ & Orally
& -- \\
\hline \hline
10h05 (5') & \partCount
Organization presentation & & \partDuration{5}
Lecture style & & Organization presentation
& & Lecture style
Orally & &
-- \\ & Orally
& -- \\
} }
\end{document} \end{document}