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