From 3415ba917115197e849c27a1384876e133fa4611 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Thu, 16 Jan 2020 14:00:48 +0100 Subject: [PATCH] =?UTF-8?q?Simplification=20des=20pr=C3=A9ambules=20par=20?= =?UTF-8?q?langue,=20factorisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rapport/english/preambule_rapport_english.tex | 122 ------------------ .../francais/preambule_rapport_francais.tex | 122 ------------------ rapport_inrae/preambule_inrae.tex | 122 ++++++++++++++++++ 3 files changed, 122 insertions(+), 244 deletions(-) diff --git a/rapport/english/preambule_rapport_english.tex b/rapport/english/preambule_rapport_english.tex index cab4e6d..6940e27 100644 --- a/rapport/english/preambule_rapport_english.tex +++ b/rapport/english/preambule_rapport_english.tex @@ -12,125 +12,3 @@ \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} - -% Beau tableau -\usepackage{booktabs} - - - -% Quotations -% @see https://fr.sharelatex.com/learn/Typesetting_quotations -% @usage the environment displayquote prints a display quotation and the command \textquote an in-line quotation -\usepackage{csquotes} -% displayquote in italic -\renewcommand{\mkbegdispquote}[2]{\itshape} - -% Gestion de la bibliographie avec biblatex -\input{rapport/preambule_biblatex} - - -% Extra space for numbered titles in table of contents -% http://tex.stackexchange.com/a/13691/124910 -\usepackage{tocstyle} - - -% Ajout de la gestion des couleurs -% The \usepackage is obvious, but the initialization of additional commands like usenames allows you to use names of the default colors, the same 16 base colors as used in HTML. The dvipsnames allows you access to more colors, another 64, and svgnames allows access to about 150 colors. The initialization of "table" allows colors to be added to tables by placing the color command just before the table. https://en.wikibooks.org/wiki/LaTeX/Colors -% @see http://mirrors.ircam.fr/pub/CTAN/macros/latex/contrib/xcolor/xcolor.pdf -\usepackage[usenames,dvipsnames,svgnames,table]{xcolor} - -\usepackage{textcomp} % Unicode degree symbol ° - -% Ecrire les siècles -\def\siecle#1{\textsc{\romannumeral #1}\textsuperscript{e}~siècle} - -% Supprime les liens moches et permet le retour à la ligne du ToC -\PassOptionsToPackage{hyphens}{url}\usepackage[hidelinks,breaklinks]{hyperref} - -% Définition des marges -\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} - -% Table's definition -% http://www.xm1math.net/doculatex/tableaux.html -\usepackage{array,multirow,makecell} - -%How to create fixed width table columns with text raggedright/centered/raggedleft? -% @see https://tex.stackexchange.com/a/12712 -% @example \begin{tabular}{| c | L{3cm} | C{3cm} | R{3cm} |} -\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} -\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} -\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} - -% Avoir la possibilité de ne pas avoir de césure sur un bloc de texte (pour le titre en page de garde) http://tex.stackexchange.com/a/5003 -% @example \nohyphens{(text block)} -\usepackage{hyphenat} - -% pour fixer l'emplacement des figures -% \begin{figure}[H] -% Voir http://tex.stackexchange.com/a/8633 -\usepackage{float} - -%subfigures http://tex.stackexchange.com/a/37597 -\usepackage{subcaption} - -% Liens colorés http://tex.stackexchange.com/a/12408 -\usepackage{url} -\hypersetup{ - colorlinks, - linkcolor={blue!50!black}, - citecolor={blue!50!black}, - urlcolor={blue!80!black} -} - -% Forcer les figures à apparaître dans la section en cours -% http://tex.stackexchange.com/a/32605 -\usepackage[section]{placeins} - -% How to reset chapter and section counter with \part http://tex.stackexchange.com/q/54383 -\makeatletter -\@addtoreset{chapter}{part} -\makeatother - -% Redéfinition de \cleardoublepage pour créer une page vide -% \cleardoublepage permet de générer une page vide -% si le chapitre ne commence pas sur la page de droite -\makeatletter -\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else - \hbox{} - \vspace*{\fill} - - \vspace{\fill} - \thispagestyle{empty} - \newpage - \if@twocolumn\hbox{}\newpage\fi\fi\fi} -\makeatother - -% Définition des entêtes et pieds de page -\usepackage{fancyhdr} -\pagestyle{fancy} -% Fancyhdr does not apply same header/footer on chapter and non-chapter pages -% http://tex.stackexchange.com/a/117334 -\usepackage{etoolbox} -\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} -% Page de N à M -% @example \cfoot{\thepage\ sur \pageref{LastPage}} -% @see https://fr.wikibooks.org/wiki/LaTeX/Mise_en_page -\usepackage{lastpage} -% Style de page du rapport -\fancypagestyle{rapport}{ -\input{rapport/headfoot_content} -} - -% Quatrième de couverture -% @see http://latex-community.org/forum/viewtopic.php?t=26188#p92083 -\newcommand*\cleartobackcover{ - \clearpage - \ifodd\value{page}\hbox{}\vspace*{\fill}\thispagestyle{empty}\newpage\fi -} - -% Todo notes -% @usage The todonotes package makes three commands available to the user: \todo[]{}, \missingfigure{} and \listoftodos. -\usepackage{todonotes} -% Ajustement des bulles todo mises dans la marge -\setlength{\marginparwidth}{1.6cm} -%\let\marginpar\oldmarginpar \ No newline at end of file diff --git a/rapport/francais/preambule_rapport_francais.tex b/rapport/francais/preambule_rapport_francais.tex index 54bd88e..9d84cc6 100644 --- a/rapport/francais/preambule_rapport_francais.tex +++ b/rapport/francais/preambule_rapport_francais.tex @@ -12,125 +12,3 @@ \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} - -% Beau tableau -\usepackage{booktabs} - - - -% Quotations -% @see https://fr.sharelatex.com/learn/Typesetting_quotations -% @usage the environment displayquote prints a display quotation and the command \textquote an in-line quotation -\usepackage{csquotes} -% displayquote in italic -\renewcommand{\mkbegdispquote}[2]{\itshape} - -% Gestion de la bibliographie avec biblatex -\input{rapport/preambule_biblatex} - - -% Extra space for numbered titles in table of contents -% http://tex.stackexchange.com/a/13691/124910 -\usepackage{tocstyle} - - -% Ajout de la gestion des couleurs -% The \usepackage is obvious, but the initialization of additional commands like usenames allows you to use names of the default colors, the same 16 base colors as used in HTML. The dvipsnames allows you access to more colors, another 64, and svgnames allows access to about 150 colors. The initialization of "table" allows colors to be added to tables by placing the color command just before the table. https://en.wikibooks.org/wiki/LaTeX/Colors -% @see http://mirrors.ircam.fr/pub/CTAN/macros/latex/contrib/xcolor/xcolor.pdf -\usepackage[usenames,dvipsnames,svgnames,table]{xcolor} - -\usepackage{textcomp} % Unicode degree symbol ° - -% Ecrire les siècles -\def\siecle#1{\textsc{\romannumeral #1}\textsuperscript{e}~siècle} - -% Supprime les liens moches et permet le retour à la ligne du ToC -\PassOptionsToPackage{hyphens}{url}\usepackage[hidelinks,breaklinks]{hyperref} - -% Définition des marges -\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} - -% Table's definition -% http://www.xm1math.net/doculatex/tableaux.html -\usepackage{array,multirow,makecell} - -%How to create fixed width table columns with text raggedright/centered/raggedleft? -% @see https://tex.stackexchange.com/a/12712 -% @example \begin{tabular}{| c | L{3cm} | C{3cm} | R{3cm} |} -\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} -\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} -\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} - -% Avoir la possibilité de ne pas avoir de césure sur un bloc de texte (pour le titre en page de garde) http://tex.stackexchange.com/a/5003 -% @example \nohyphens{(text block)} -\usepackage{hyphenat} - -% pour fixer l'emplacement des figures -% \begin{figure}[H] -% Voir http://tex.stackexchange.com/a/8633 -\usepackage{float} - -%subfigures http://tex.stackexchange.com/a/37597 -\usepackage{subcaption} - -% Liens colorés http://tex.stackexchange.com/a/12408 -\usepackage{url} -\hypersetup{ - colorlinks, - linkcolor={blue!50!black}, - citecolor={blue!50!black}, - urlcolor={blue!80!black} -} - -% Forcer les figures à apparaître dans la section en cours -% http://tex.stackexchange.com/a/32605 -\usepackage[section]{placeins} - -% How to reset chapter and section counter with \part http://tex.stackexchange.com/q/54383 -\makeatletter -\@addtoreset{chapter}{part} -\makeatother - -% Redéfinition de \cleardoublepage pour créer une page vide -% \cleardoublepage permet de générer une page vide -% si le chapitre ne commence pas sur la page de droite -\makeatletter -\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else - \hbox{} - \vspace*{\fill} - - \vspace{\fill} - \thispagestyle{empty} - \newpage - \if@twocolumn\hbox{}\newpage\fi\fi\fi} -\makeatother - -% Définition des entêtes et pieds de page -\usepackage{fancyhdr} -\pagestyle{fancy} -% Fancyhdr does not apply same header/footer on chapter and non-chapter pages -% http://tex.stackexchange.com/a/117334 -\usepackage{etoolbox} -\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} -% Page de N à M -% @example \cfoot{\thepage\ sur \pageref{LastPage}} -% @see https://fr.wikibooks.org/wiki/LaTeX/Mise_en_page -\usepackage{lastpage} -% Style de page du rapport -\fancypagestyle{rapport}{ -\input{rapport/headfoot_content} -} - -% Quatrième de couverture -% @see http://latex-community.org/forum/viewtopic.php?t=26188#p92083 -\newcommand*\cleartobackcover{ - \clearpage - \ifodd\value{page}\hbox{}\vspace*{\fill}\thispagestyle{empty}\newpage\fi -} - -% Todo notes -% @usage The todonotes package makes three commands available to the user: \todo[]{}, \missingfigure{} and \listoftodos. -\usepackage{todonotes} -% Ajustement des bulles todo mises dans la marge -\setlength{\marginparwidth}{1.6cm} -%\let\marginpar\oldmarginpar \ No newline at end of file diff --git a/rapport_inrae/preambule_inrae.tex b/rapport_inrae/preambule_inrae.tex index d704b58..99daa5b 100644 --- a/rapport_inrae/preambule_inrae.tex +++ b/rapport_inrae/preambule_inrae.tex @@ -5,12 +5,134 @@ % @date Avril 2017 %******************************************************************************* + +% Beau tableau +\usepackage{booktabs} + + +% Quotations +% @see https://fr.sharelatex.com/learn/Typesetting_quotations +% @usage the environment displayquote prints a display quotation and the command \textquote an in-line quotation +\usepackage{csquotes} +% displayquote in italic +\renewcommand{\mkbegdispquote}[2]{\itshape} + +% Gestion de la bibliographie avec biblatex +\input{rapport/preambule_biblatex} + + +% Extra space for numbered titles in table of contents +% http://tex.stackexchange.com/a/13691/124910 +\usepackage{tocstyle} + + +% Ajout de la gestion des couleurs +% The \usepackage is obvious, but the initialization of additional commands like usenames allows you to use names of the default colors, the same 16 base colors as used in HTML. The dvipsnames allows you access to more colors, another 64, and svgnames allows access to about 150 colors. The initialization of "table" allows colors to be added to tables by placing the color command just before the table. https://en.wikibooks.org/wiki/LaTeX/Colors +% @see http://mirrors.ircam.fr/pub/CTAN/macros/latex/contrib/xcolor/xcolor.pdf +\usepackage[usenames,dvipsnames,svgnames,table]{xcolor} + +\usepackage{textcomp} % Unicode degree symbol ° + +% Ecrire les siècles +\def\siecle#1{\textsc{\romannumeral #1}\textsuperscript{e}~siècle} + +% Supprime les liens moches et permet le retour à la ligne du ToC +\PassOptionsToPackage{hyphens}{url}\usepackage[hidelinks,breaklinks]{hyperref} + +% Définition des marges +\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} + +% Table's definition +% http://www.xm1math.net/doculatex/tableaux.html +\usepackage{array,multirow,makecell} + +%How to create fixed width table columns with text raggedright/centered/raggedleft? +% @see https://tex.stackexchange.com/a/12712 +% @example \begin{tabular}{| c | L{3cm} | C{3cm} | R{3cm} |} +\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} +\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} +\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} + +% Avoir la possibilité de ne pas avoir de césure sur un bloc de texte (pour le titre en page de garde) http://tex.stackexchange.com/a/5003 +% @example \nohyphens{(text block)} +\usepackage{hyphenat} + +% pour fixer l'emplacement des figures +% \begin{figure}[H] +% Voir http://tex.stackexchange.com/a/8633 +\usepackage{float} + +%subfigures http://tex.stackexchange.com/a/37597 +\usepackage{subcaption} + +% Liens colorés http://tex.stackexchange.com/a/12408 +\usepackage{url} +\hypersetup{ + colorlinks, + linkcolor={blue!50!black}, + citecolor={blue!50!black}, + urlcolor={blue!80!black} +} + +% Forcer les figures à apparaître dans la section en cours +% http://tex.stackexchange.com/a/32605 +\usepackage[section]{placeins} + +% How to reset chapter and section counter with \part http://tex.stackexchange.com/q/54383 +\makeatletter +\@addtoreset{chapter}{part} +\makeatother + +% Redéfinition de \cleardoublepage pour créer une page vide +% \cleardoublepage permet de générer une page vide +% si le chapitre ne commence pas sur la page de droite +\makeatletter +\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else + \hbox{} + \vspace*{\fill} + + \vspace{\fill} + \thispagestyle{empty} + \newpage + \if@twocolumn\hbox{}\newpage\fi\fi\fi} +\makeatother + +% Définition des entêtes et pieds de page +\usepackage{fancyhdr} +\pagestyle{fancy} +% Fancyhdr does not apply same header/footer on chapter and non-chapter pages +% http://tex.stackexchange.com/a/117334 +\usepackage{etoolbox} +\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} +% Page de N à M +% @example \cfoot{\thepage\ sur \pageref{LastPage}} +% @see https://fr.wikibooks.org/wiki/LaTeX/Mise_en_page +\usepackage{lastpage} +% Style de page du rapport +\fancypagestyle{rapport}{ +\input{rapport/headfoot_content} +} + % Définition de la police du document http://stackoverflow.com/q/877597 \usepackage{times} \renewcommand{\familydefault}{\sfdefault} \urlstyle{same} %http://tex.stackexchange.com/questions/261434/changing-url-font +% Quatrième de couverture +% @see http://latex-community.org/forum/viewtopic.php?t=26188#p92083 +\newcommand*\cleartobackcover{ + \clearpage + \ifodd\value{page}\hbox{}\vspace*{\fill}\thispagestyle{empty}\newpage\fi +} + +% Todo notes +% @usage The todonotes package makes three commands available to the user: \todo[]{}, \missingfigure{} and \listoftodos. +\usepackage{todonotes} +% Ajustement des bulles todo mises dans la marge +\setlength{\marginparwidth}{1.6cm} +%\let\marginpar\oldmarginpar + % Definition des couleurs \RequirePackage{rapport_inrae/inraecolors} -- GitLab