From dcf0ebcaf173cb27edbd49b030326f45f1c67103 Mon Sep 17 00:00:00 2001 From: Gregory Trullemans Date: Mon, 12 Aug 2024 17:38:32 +0200 Subject: [PATCH] Add condition to display season. --- ffgTemplate.sty | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ffgTemplate.sty b/ffgTemplate.sty index ae60dbf..43febd5 100644 --- a/ffgTemplate.sty +++ b/ffgTemplate.sty @@ -101,6 +101,10 @@ \setlength\fboxrule{0.75pt} \newcommand{\mybox}[1]{\fbox{$~~~ \displaystyle#1 ~~~$}} +\newcommand\PreviousYear{% + \advance\year by -1 \the\year\advance\year by 1 +} + \newcommand\NextYear{% \advance\year by 1 \the\year\advance\year by -1 } @@ -150,7 +154,11 @@ % Saisons concernées \begin{textblock}{200}(0,11.68) \centering - \textcolor{white}{\fontsize{30}{84}\selectfont {\the\year}\hspace{3cm} {\NextYear}}\par + \ifnum \number\month < 9 + \textcolor{white}{\fontsize{30}{84}\selectfont {\PreviousYear}\hspace{3cm} {\the\year}}\par + \else + \textcolor{white}{\fontsize{30}{84}\selectfont {\the\year}\hspace{3cm} {\NextYear}}\par + \fi \end{textblock} % FfG en bas à gauche @@ -182,7 +190,11 @@ \renewcommand{\footrulewidth}{0pt} \fancyfoot[L]{\fontsize{9}{10}\selectfont \textit{\textcolor{footer_color}{Formation des Cadres\\ \discipline}}} \fancyfoot[C]{\fontsize{9}{10}\selectfont \textit{\textcolor{footer_color}{p. \thepage}}} - \fancyfoot[R]{\fontsize{9}{10}\selectfont \textit{\textcolor{footer_color}{Edition \the\year~-~\NextYear}}} + \ifnum \number\month < 9 + \fancyfoot[R]{\fontsize{9}{10}\selectfont \textit{\textcolor{footer_color}{Edition \PreviousYear~-~\the\year}}} + \else + \fancyfoot[R]{\fontsize{9}{10}\selectfont \textit{\textcolor{footer_color}{Edition \the\year~-~\NextYear}}} + \fi }