From f3b5317e9cc0f627302a64241570711be6a6d3c3 Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Tue, 3 Oct 2023 21:29:31 +0200 Subject: [PATCH] Corrige les headers/footers pour toutes les classes --- template.latex | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/template.latex b/template.latex index b17497d..e28c20a 100644 --- a/template.latex +++ b/template.latex @@ -509,7 +509,12 @@ $if(abstract)$ $endif$ % Allow to access the total number of pages -\usepackage{lastpage} + +\usepackage{pageslts} + +%\pagenumbering{arabic} +% Define the page numbering to roman numbers +\newcommand{\lastpageofpart}{\lastpageref*{pagesLTS.arabic}} % Allow to generate text from Lorem Ipsum \usepackage{lipsum} @@ -519,30 +524,36 @@ $endif$ \usepackage{fancyhdr} \pagestyle{fancy} $if(date)$ -\fancyhead[LO,RE]{\date{$date$}} +\fancyhead[LO,RE]{$date$} $else$ -\fancyhead[LO,RE]{\date{\today}} +\fancyhead[LO,RE]{\today} $endif$ $if(header)$ -\fancyhead[CO,CE]{$header$} -$endif$ -$if(version)$ -\fancyhead[RO,LE]{v$version$} +\fancyhead[RO,LE]{$header$} $endif$ -\fancyfoot[LO,RE]{$footer$} -\fancyfoot[CE,CO]{$title$} -% Total page without link (because of the * on pageref) -\fancyfoot[RO,LE]{\thepage / \pageref*{LastPage}} +% Flush right (raggedleft) on even pages +\fancyfoot[LO]{\begin{minipage}[t]{3cm}$if(license)$$license$\\$endif$$author$\end{minipage}} +\fancyfoot[RE]{\begin{minipage}[t]{3cm}\raggedleft{}$if(license)$$license$\\$endif$$author$\end{minipage}} +\fancyfoot[CE,CO]{$if(title)$$title$$endif$ $if(title)$$if(version)$--$endif$$endif$ $if(version)$v$version$$endif$} +\fancyfoot[RO,LE]{Page \thepage{}/\lastpageofpart} + \fancypagestyle{firstpage}{% \fancyhead{}% \renewcommand{\headrulewidth}{0pt}% } - +\fancypagestyle{plain}{% + \fancyhead{}% + \renewcommand{\headrulewidth}{0pt}% +} \begin{document} $if(has-frontmatter)$ +\renewcommand{\lastpageofpart}{\lastpageref*{pagesLTS.roman}} +\pagenumbering{roman} \frontmatter +$else$ +\pagenumbering{arabic} $endif$ $if(title)$ $if(beamer)$ @@ -594,6 +605,9 @@ $if(linestretch)$ $endif$ $if(has-frontmatter)$ \mainmatter +% Define the page numbering to arabic numbers +\renewcommand{\lastpageofpart}{\lastpageref*{pagesLTS.arabic}} +\pagenumbering{arabic} \thispagestyle{fancy} $endif$