En-têtes communes pour LaTeX
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.9 KiB

  1. % Style avancée pour l’en-tête et les pieds-de-page
  2. %\usepackage{scrlayer-scrpage}
  3. %\ofoot*{∼\thepage∼} % Partie externe du pied de page
  4. \recalctypearea % Recompute typearea after selecting the font
  5. \usepackage{geometry} % Use geometry for some advance layout
  6. % Since top is half of bottom, we had half of top to topmargin to get vmarginratio={1:1} without changing the textheight or headersep
  7. \addtolength{\topmargin}{.5\topmargin} % Start with topmargin, else the .5in is already added
  8. \addtolength{\topmargin}{.5in}
  9. \addtolength{\topmargin}{.5\headsep}
  10. \addtolength{\topmargin}{.5\headheight}
  11. % Reduce a bit the footskip
  12. \setlength{\footskip}{2\headsep}
  13. % Règles typographiques de l’imprimerie nationale
  14. \usepackage[parindent,lastparline,nosingleletter]{impnattypo}
  15. % Lignes orphelines
  16. \usepackage[all]{nowidow}
  17. % Custom minitoc
  18. \usepackage{etoc}
  19. \newcommand{\minitoc}{%
  20. \etocsettocstyle{\subsection*{Sommaire\vspace{-1em}\\\rule{\textwidth}{0.5pt}}}{}%
  21. \etocsetstyle{section}{}{}{\etocsavedsectiontocline{\bfseries\numberline{\etocnumber}\etocname}{\bfseries\etocpage}}{}%
  22. \etocsetstyle{subsection}{}{}{\etocsavedsubsectiontocline{\numberline{\etocnumber}\etocname}{\etocpage}}{}%
  23. {\small\localtableofcontents}%
  24. \noindent\rule{\textwidth}{0.5pt}%
  25. \vspace{1em}
  26. }
  27. % Nombres tabulés pour les numéros de pages dans les tables des matières
  28. \DeclareTOCStyleEntry[pagenumberformat={\bfseries\addfontfeatures{Numbers=Monospaced}}]{default}{part}
  29. \DeclareTOCStyleEntry[pagenumberformat={\bfseries\addfontfeatures{Numbers=Monospaced}}]{default}{chapter}
  30. \DeclareTOCStyleEntry[pagenumberformat={\addfontfeatures{Numbers=Monospaced}}]{default}{section}
  31. \DeclareTOCStyleEntry[pagenumberformat={\addfontfeatures{Numbers=Monospaced}}]{default}{subsection}
  32. \makeatletter
  33. \renewcommand{\@pnumwidth}{1.6em} % Compensation de l’espace supplémentaire occupé
  34. \makeatother