Skip to content
Snippets Groups Projects
Commit 33941780 authored by David Dorchies's avatar David Dorchies :zany_face:
Browse files

refactor: templates organization based on basic template

After #19

Refs #11
parent 190da2c0
No related branches found
No related tags found
No related merge requests found
% Basic report template
\usepackage[utf8]{inputenc}
% Page margin definitions
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
% Citations renderer
\usepackage[style=authoryear,]{biblatex}
% Keep lower case in biblatex French
% https://tex.stackexchange.com/questions/438423/keep-lowercase-in-biblatex
\iflanguage{french}{\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}}
% 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}
% Table format
% https://bookdown.org/yihui/bookdown/tables.html#cb48
% https://bookdown.org/yihui/bookdown/yaml-options.html#cb112
\usepackage{booktabs}
\usepackage{longtable}
% Extra space for numbered titles in table of contents
% http://tex.stackexchange.com/a/13691/124910
% \usepackage{tocstyle} % tocstyle is deprecated see https://ctan.org/pkg/tocstyle
\usepackage{tocbasic}
\usepackage{textcomp} % Unicode degree symbol °
% Ecrire les siècles
\iflanguage{french}{\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}
%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}
......@@ -5,10 +5,9 @@
\newcommand{\insertthirdlogo}{}
\newcommand{\insertfourthlogo}{}
\input{../../templates/basic/in_header}
\input{../../templates/inrae/preambule_inrae.tex}
%\usepackage[french]{babel}
\newcommand{\service}{UMR G-EAU}
\newcommand{\site}{
UMR G-EAU
......
......@@ -5,82 +5,7 @@
% @date Avril 2017
%*******************************************************************************
% Citations renderer
\usepackage[style=authoryear,]{biblatex}
% Keep lower case in biblatex French
% https://tex.stackexchange.com/questions/438423/keep-lowercase-in-biblatex
%\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
% Beau tableau
\usepackage{booktabs}
\usepackage{tikz}
% 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} % tocstyle is deprecated see https://ctan.org/pkg/tocstyle
\usepackage{tocbasic}
% In case of `no room for new \write` issue
% \usepackage{scrwfile}
% 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
......@@ -121,8 +46,6 @@
% \input{rapport/headfoot_content}
% }
\usepackage[utf8]{inputenc}
% Définition de la police du document http://stackoverflow.com/q/877597
\usepackage{times}
\renewcommand{\familydefault}{\sfdefault}
......@@ -130,6 +53,7 @@
\urlstyle{same} %http://tex.stackexchange.com/questions/261434/changing-url-font
% Première de couverture
\usepackage{tikz}
\usepackage{titling}
\makeatletter
\def\maketitle{%
......@@ -158,6 +82,8 @@
\definecolor{titreColor}{HTML}{008C8E} % inraeDark
\definecolor{linkColor}{HTML}{423089} % inraeBlue
% Liens colorés http://tex.stackexchange.com/a/12408
\usepackage{url}
\hypersetup{
colorlinks,
linkcolor={linkColor},
......@@ -202,9 +128,6 @@
\usepackage{enumitem}
\setlist[itemize]{label=\raisebox{0.25ex}{$\bullet$}}
% Acronymes
\usepackage[printonlyused,withpage]{acronym}
% List of figures and tables as sections in a report https://texblog.org/2014/03/25/table-of-contents-list-of-figures-and-tables-as-sections-in-a-report/
\makeatletter
\renewcommand\listoftables{%
......@@ -216,3 +139,7 @@
\@starttoc{lof}%
}
\makeatother
% Acronymes
\usepackage[printonlyused,withpage]{acronym}
......@@ -22,6 +22,7 @@
\url{www.inrae.fr}
}
\input{../../templates/basic/in_header}
\input{../../templates/inrae/preambule_inrae.tex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment