diff --git a/.Rbuildignore b/.Rbuildignore index 91114bf2f2bba5e0c5252e75018da19b869776f1..33e79e6e3209365c821c8bc398aff91dbbe0956b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,5 @@ ^.*\.Rproj$ ^\.Rproj\.user$ +^reports$ +^public$ +^templates$ diff --git a/.gitignore b/.gitignore index c9ab84a53cd3a058ebba2059b4053b2a617d9414..118ad3395b294d7f7f9b184c6b4c6096b1959211 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,11 @@ po/*~ # RStudio Connect folder rsconnect/ + +################################################################################ +# Specific ignored files for fairify package +################################################################################ + +/public +/reports +/templates diff --git a/inst/bookdown_template/_bookdown.yml b/inst/bookdown_template/_bookdown.yml new file mode 100644 index 0000000000000000000000000000000000000000..7f3b0e68acbf524fa25693a6baaabf059d319153 --- /dev/null +++ b/inst/bookdown_template/_bookdown.yml @@ -0,0 +1,6 @@ +book_filename: "_01-GRS_specs" +delete_merged_file: true +language: + ui: + chapter_name: "Chapitre " +new_session: false diff --git a/inst/bookdown_template/_output.yml b/inst/bookdown_template/_output.yml new file mode 100644 index 0000000000000000000000000000000000000000..b02676f2fdc4ffdde0d58e0e7ac1213f440b7b0e --- /dev/null +++ b/inst/bookdown_template/_output.yml @@ -0,0 +1,18 @@ +bookdown::gitbook: + css: style.css + config: + toc: + before: | + <li><a href="./"><img src="../../templates/inrae/bloc_etat.png" width = "130"></a></li> + after: | + <li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li> + download: ["pdf"] +bookdown::pdf_book: + includes: + in_header: ../../templates/umr_geau/preamble.tex + after_body: ../../templates/inrae/after_body.tex + latex_engine: pdflatex + citation_package: biblatex + keep_tex: yes +bookdown::epub_book: default +bookdown::bs4_book: default diff --git a/inst/bookdown_template/index.Rmd b/inst/bookdown_template/index.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..4c82d2d240c4e47d6fedbd6048b2f7865ddf1b14 --- /dev/null +++ b/inst/bookdown_template/index.Rmd @@ -0,0 +1,35 @@ +--- +title: "Titre du rapport" +author: "Auteur du rapport" +date: "Date du rapport `r Sys.Date()`" +site: bookdown::bookdown_site +documentclass: report +bibliography: + - references.bib +biblio-style: authoryear +link-citations: yes +description: "" +always_allow_html: true +--- + +```{r setup, include = FALSE, file = 'setup.R'} +``` + +Tout à partir d'ici peut être effacé. + +# Titre du premier chapitre + + +## Titre de la première section + +Avec une référence sans parenthèses: @knuth84. + +Mais on peut aussi y faire référence comme ceci [@knuth84] + +## Titre de la deuxième section + + + +# Nouveau chapitre + +Ceci est un nouveau chapitre. diff --git a/inst/bookdown_template/references.bib b/inst/bookdown_template/references.bib new file mode 100644 index 0000000000000000000000000000000000000000..e07eb38e2f5bed7ec57c2267f09ea6d91fc63de3 --- /dev/null +++ b/inst/bookdown_template/references.bib @@ -0,0 +1,17 @@ +@article{knuth84, + author = {Knuth, Donald E.}, + title = {Literate Programming}, + year = {1984}, + issue_date = {May 1984}, + publisher = {Oxford University Press, Inc.}, + address = {USA}, + volume = {27}, + number = {2}, + issn = {0010-4620}, + url = {https://doi.org/10.1093/comjnl/27.2.97}, + doi = {10.1093/comjnl/27.2.97}, + journal = {Comput. J.}, + month = may, + pages = {97–111}, + numpages = {15} +} diff --git a/inst/bookdown_template/setup.R b/inst/bookdown_template/setup.R new file mode 100644 index 0000000000000000000000000000000000000000..ff3ca7a375fb2293ee26f0b8de12f53c13209ccd --- /dev/null +++ b/inst/bookdown_template/setup.R @@ -0,0 +1,7 @@ +# Global report configuration +source("../../templates/setup.R") + +# Add below specific configuration for this report + +# Load this package and its configuration +# library(myPackage) diff --git a/inst/bookdown_template/style.css b/inst/bookdown_template/style.css new file mode 100644 index 0000000000000000000000000000000000000000..2da01aa4b933e49307794fbba95f80fe3a2969d5 --- /dev/null +++ b/inst/bookdown_template/style.css @@ -0,0 +1,73 @@ +body { + font-size: 1.6rem; + text-align: justify; +} + +.title { + color: firebrick; + color: #284c59; + font-family: "Raleway"; + font-weight: bold; +} + +.book .book-header, .book .book-summary { + font-family: "Raleway", Arial, sans-serif; + background: #FFFFFF; + color: #00a3a6; +} + +h1,h2,h3,h4,h5 { + text-align: left; + color: #00a3a6; + font-family: "Raleway"; + font-weight: bold; +} + +.blue-box { + background-color: #e6f0ff; + border-radius: 5px; + padding: 20px; + margin-bottom: 10px; +} + +.green-box { + background-color: #d9ffe9; + border-radius: 5px; + padding: 20px; + margin-bottom: 10px; +} + +.orange-box { + background-color: #ffeedf; + border-radius: 5px; + padding: 20px; + margin-bottom: 10px; +} + +.caution, .important, .note, .tip, .warning { + padding: 1em 1em 1em 4em; + margin-bottom: 10px; + background: #f5f5f5 5px center/3em no-repeat; + border: 2px solid orange; + border-radius: 10px; +} + +.caution { + background-image: url("img/caution.png"); +} + +.important { + background-image: url("img/important.png"); +} + +.note { + background-image: url("img/note.png"); +} + +.tip { + background-image: url("img/tip.png"); +} + +.warning { + background-image: url("img/warning.png"); +} diff --git a/inst/reports/.gitignore b/inst/reports/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0c4b87ee121edea9d23c04cbefbfcd98c498a97a --- /dev/null +++ b/inst/reports/.gitignore @@ -0,0 +1,13 @@ +myBook.* +*/_book +*/*_files +*/*_cache +*/config.yml +*/.Rhistory +*/*.tsv +*.md +*.log +*.wrt +*.rds +*.pdf + diff --git a/inst/templates/.gitignore b/inst/templates/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a018796cd126fd9863be2b0ceca2b4019f50cf58 --- /dev/null +++ b/inst/templates/.gitignore @@ -0,0 +1,12 @@ +myBook.* +*/_book +*/*_files +*/*_cache +*/config.yml +*/.Rhistory +*/*.tsv +*.md +*.log +*.wrt +*.rds +*.pdf diff --git a/inst/templates/inrae/after_body.tex b/inst/templates/inrae/after_body.tex new file mode 100644 index 0000000000000000000000000000000000000000..84aab12107a4eca17d8aff8ab9f6ad5613156e00 --- /dev/null +++ b/inst/templates/inrae/after_body.tex @@ -0,0 +1,15 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BEGIN AFTER_BODY.TEX +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\listoftables + +\listoffigures + +\cleartobackcover + +\input{../../templates/inrae/backcover_inrae} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% END AFTER_BODY.TEX +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/inst/templates/inrae/backcover_inrae.tex b/inst/templates/inrae/backcover_inrae.tex new file mode 100644 index 0000000000000000000000000000000000000000..b259edfb717bea60a8ce4f97a6a8d41f00aeef8c --- /dev/null +++ b/inst/templates/inrae/backcover_inrae.tex @@ -0,0 +1,40 @@ +%******************************************************************************* +% @file rapport_irtea/backcover.tex +% 4ème de couverture rapport INRAE +% @author David Dorchies, Mathias Chouet (INRAE Montpellier) +% @date Avril 2017, janvier 2020 +%******************************************************************************* + + +~ +\vfill + +\begin{center} + \color{inrae} + \includegraphics{../../templates/inrae/chevron.png} + + \vspace{3mm} + + \scriptsize + \textbf{\service}\\ + \adresse\\ + \telephone + + \vspace{5.5mm} + + Rejoignez-nous sur :\\ + \includegraphics{../../templates/inrae/reseaux_sociaux.png}\\ + \textbf{\website} + + \vspace{27mm} + + \normalsize + Institut national de recherche pour\\ + \textbf{l'agriculture, l'alimentation et l'environnement} + + \vspace{3cm} + + \includegraphics{../../templates/inrae/logo_inrae_dos_bas.png} +\end{center} + +\thispagestyle{empty} diff --git a/inst/templates/inrae/bloc_etat.png b/inst/templates/inrae/bloc_etat.png new file mode 100644 index 0000000000000000000000000000000000000000..7c2935988d367bc7849d0227e7012fe404ed6a31 Binary files /dev/null and b/inst/templates/inrae/bloc_etat.png differ diff --git a/inst/templates/inrae/chevron.png b/inst/templates/inrae/chevron.png new file mode 100644 index 0000000000000000000000000000000000000000..6236f27ecd49e8d3b2df1e58fe2be9625224cd89 Binary files /dev/null and b/inst/templates/inrae/chevron.png differ diff --git a/inst/templates/inrae/cover_inrae.tex b/inst/templates/inrae/cover_inrae.tex new file mode 100644 index 0000000000000000000000000000000000000000..d460a6092c583ea90ee9b72c9e6b5dfe90b7ed12 --- /dev/null +++ b/inst/templates/inrae/cover_inrae.tex @@ -0,0 +1,39 @@ + +\thispagestyle{empty} + +\tikz[remember picture,overlay] \node[opacity=1,inner sep=0pt] at (current page.center) { + \includegraphics[width=\paperwidth]{../../templates/inrae/inrae_fond_page.jpg} +}; + +\vspace{-4.7mm} + + +\begin{minipage}[t][11cm][t]{0.95\textwidth} + % "sed" this line to easily replace the default logos with yours + \input{../../templates/inrae/logos} +\end{minipage} + + +\vspace{11mm} + +\includegraphics{../../templates/inrae/chevron.png}\\ + +\vspace{-3mm} + +\hspace{3mm} +\begin{minipage}{0.75\textwidth} + \color{inraeDarker} + \LARGE + %\noindent \textbf{Accedat suavitas quaedam oportet sermonum atque mediocre}\\ + \noindent \textbf{\thetitle}\\ + + \vspace{-4mm} + + \color{inrae} + \small + %\noindent \textbf{Dubitatio veteribus est amicitiae non esse novi veteribus verumque} + % \noindent \textbf{\sousTitre}\\ + + \MakeUppercase{\thedate}\\ + \textbf{\MakeUppercase{\theauthor}} +\end{minipage} diff --git a/inst/templates/inrae/emplacement_logo.jpg b/inst/templates/inrae/emplacement_logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0b2e906f06788bf09196774a9b165f40ffd32e9d Binary files /dev/null and b/inst/templates/inrae/emplacement_logo.jpg differ diff --git a/inst/templates/inrae/inrae_fond_page.jpg b/inst/templates/inrae/inrae_fond_page.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c34e2d490e89ec2faa63a8b36c7aea4bb47dc203 Binary files /dev/null and b/inst/templates/inrae/inrae_fond_page.jpg differ diff --git a/inst/templates/inrae/inraecolors.sty b/inst/templates/inrae/inraecolors.sty new file mode 100644 index 0000000000000000000000000000000000000000..fc0bc2c29f6d70d4d7dcdbee97db8c0c1700628a --- /dev/null +++ b/inst/templates/inrae/inraecolors.sty @@ -0,0 +1,71 @@ +% Couleurs de la charte graphique INRAE +% Voir https://intranet.inrae.fr/charte-identitaire/Boite-a-outils + +\definecolor{inrae}{HTML}{00a3a6} +\definecolor{inraeDark}{HTML}{008c8e} +\definecolor{inraeDarker}{HTML}{275662} +\definecolor{inraeLight}{HTML}{66C1BF} + +% le "vert" INRAE +\definecolor{inraeGreen}{HTML}{9dc544} + +% le "turquoise" INRAE +\definecolor{inraeTurquoise}{HTML}{9ed6e3} + +% le "bleu" INRAE +\definecolor{inraeBlue}{HTML}{423089} + +% le "gris foncé" INRAE +\definecolor{inraeDarkGrey}{HTML}{797870} + +% le "gris clair" INRAE +\definecolor{inraeLightGrey}{HTML}{c4c0b3} + + + +% Couleurs Irstea héritées + +% butter (yellowish) +\definecolor{tabutter}{rgb}{0.98824, 0.91373, 0.30980} % #fce94f +\definecolor{ta2butter}{rgb}{0.92941, 0.83137, 0} % #edd400 +\definecolor{ta3butter}{rgb}{0.76863, 0.62745, 0} % #c4a000 + +% orange +\definecolor{taorange}{rgb}{0.98824, 0.68627, 0.24314} % #fcaf3e +\definecolor{ta2orange}{rgb}{0.96078, 0.47451, 0} % #f57900 +\definecolor{ta3orange}{rgb}{0.80784, 0.36078, 0} % #ce5c00 + +% chocolate (brownish) +\definecolor{tachocolate}{rgb}{0.91373, 0.72549, 0.43137} % #e9b96e +\definecolor{ta2chocolate}{rgb}{0.75686, 0.49020, 0.066667} % #c17d11 +\definecolor{ta3chocolate}{rgb}{0.56078, 0.34902, 0.0078431} % #8f5902 + +% chameleon (greenish) +\definecolor{tachameleon}{rgb}{0.54118, 0.88627, 0.20392} % #8ae234 +\definecolor{ta2chameleon}{rgb}{0.45098, 0.82353, 0.086275} % #73d216 +\definecolor{ta3chameleon}{rgb}{0.30588, 0.60392, 0.023529} % #4e9a06 + +% sky blue +\definecolor{taskyblue}{rgb}{0.44706, 0.56078, 0.81176} % #728fcf +\definecolor{ta2skyblue}{rgb}{0.20392, 0.39608, 0.64314} % #3465a4 +\definecolor{ta3skyblue}{rgb}{0.12549, 0.29020, 0.52941} % #204a87 + +% plum (violettish) +\definecolor{taplum}{rgb}{0.67843, 0.49804, 0.65882} % #ad7fa8 +\definecolor{ta2plum}{rgb}{0.45882, 0.31373, 0.48235} % #75507b +\definecolor{ta3plum}{rgb}{0.36078, 0.20784, 0.4} % #5c3566 + +% scarlet red +\definecolor{tascarletred}{rgb}{0.93725, 0.16078, 0.16078} % #ef2929 +\definecolor{ta2scarletred}{rgb}{0.8, 0, 0} % #cc0000 +\definecolor{ta3scarletred}{rgb}{0.64314, 0, 0} % #a40000 + +% aluminium +\definecolor{taaluminium}{rgb}{0.93333, 0.93333, 0.92549} % #eeeeec +\definecolor{ta2aluminium}{rgb}{0.82745, 0.84314, 0.81176} % #d3d7cf +\definecolor{ta3aluminium}{rgb}{0.72941, 0.74118, 0.71373} % #babdb6 + +% gray +\definecolor{tagray}{rgb}{0.53333, 0.54118, 0.52157} % #888a85 +\definecolor{ta2gray}{rgb}{0.33333, 0.34118, 0.32549} % #555753 +\definecolor{ta3gray}{rgb}{0.18039, 0.20392, 0.21176} % #2e3436 diff --git a/inst/templates/inrae/logo_inrae_couv_haut.png b/inst/templates/inrae/logo_inrae_couv_haut.png new file mode 100644 index 0000000000000000000000000000000000000000..c8452f7b0c8f6a7141510146e286d1af60bc7faf Binary files /dev/null and b/inst/templates/inrae/logo_inrae_couv_haut.png differ diff --git a/inst/templates/inrae/logo_inrae_dos_bas.png b/inst/templates/inrae/logo_inrae_dos_bas.png new file mode 100644 index 0000000000000000000000000000000000000000..e0cb0170e43c4768c8360274e614a24b18b18782 Binary files /dev/null and b/inst/templates/inrae/logo_inrae_dos_bas.png differ diff --git a/inst/templates/inrae/logos.tex b/inst/templates/inrae/logos.tex new file mode 100644 index 0000000000000000000000000000000000000000..7a49f2e73a48443c2c9b53467ce067ea4bc92aa7 --- /dev/null +++ b/inst/templates/inrae/logos.tex @@ -0,0 +1,19 @@ +% Example of logos layout for page "cover_inrae.tex" + +\hfill +\includegraphics[width=4cm]{../../templates/inrae/logo_inrae_couv_haut.png} + +\vspace{3mm} + +\hfill +\insertsecondlogo + +\vspace{3mm} + +\hfill +\insertthirdlogo + +\vspace{3mm} + +\hfill +\insertfourthlogo diff --git a/inst/templates/inrae/preamble.tex b/inst/templates/inrae/preamble.tex new file mode 100644 index 0000000000000000000000000000000000000000..78b1f9920dc92cb1ac1de59d7e686fdde557512f --- /dev/null +++ b/inst/templates/inrae/preamble.tex @@ -0,0 +1,28 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BEGIN PREAMBLE.TEX +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\insertsecondlogo}{} +\newcommand{\insertthirdlogo}{} +\newcommand{\insertfourthlogo}{} + +\input{../../templates/inrae/preambule_inrae.tex} + +\usepackage[french]{babel} + +\newcommand{\service}{UMR G-EAU} +\newcommand{\site}{ + UMR G-EAU + + Inrae, Montpellier +} +% Adresse du site +\newcommand{\adresse}{361 rue J-F Breton - BP 5095\\34196 Montpellier cedex 5} +% Téléphone et télécopie +\newcommand{\telephone}{tél. : +33(0)4670400} +\newcommand{\website}{\url{www.g-eau.fr} \\ +\url{www.inrae.fr} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% END PREAMBLE.TEX +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/inst/templates/inrae/preambule_inrae.tex b/inst/templates/inrae/preambule_inrae.tex new file mode 100644 index 0000000000000000000000000000000000000000..5d1ec4ad7049748dfb0ba0982d17873bf6b7b86b --- /dev/null +++ b/inst/templates/inrae/preambule_inrae.tex @@ -0,0 +1,212 @@ +%******************************************************************************* +% @file rapport_inrae/preambule_inrae.tex +% Préambule pour modèle de rapport INRAE +% @author David Dorchies (INRAE Montpellier) +% @date Avril 2017 +%******************************************************************************* + + +% 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} +\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 +\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} +% } + +\usepackage[utf8]{inputenc} + +% 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 + +% Première de couverture +\usepackage{titling} +\makeatletter +\def\maketitle{% +\input{../../templates/inrae/cover_inrae.tex} +} +\makeatother + +% 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{../../templates/inrae/inraecolors} + +% Pourquoi les couleurs chargées depuis "inraecolors" ne sont-elles pas disponibles pour \hypersetup ci-dessous ? +\definecolor{titreColor}{HTML}{008C8E} % inraeDark +\definecolor{linkColor}{HTML}{423089} % inraeBlue + +\hypersetup{ + colorlinks, + linkcolor={linkColor}, + citecolor={linkColor}, + urlcolor={linkColor} +} + +% Definition des titres +\usepackage{titlesec} +\titleformat{\chapter} + [block] + {\color{titreColor}\normalfont\Large\bfseries\sffamily} + {\thechapter}{0.5em}{} + +\titleformat{\section} + [block] + {\color{titreColor}\normalfont\Large\bfseries\sffamily\raggedright} + {\thesection}{0.5em}{} + +\titleformat{\subsection} + [block] + {\color{titreColor}\normalfont\bfseries\sffamily\itshape\raggedright} + {\thesubsection}{0.5em}{} + +\titleformat{\subsubsection} + [block] + {\color{titreColor}\normalfont\sffamily\itshape\raggedright} + {\thesubsubsection}{0.5em}{} + +\setcounter{secnumdepth}{4} % for numbering subsubsection http://tex.stackexchange.com/a/42163 + +% Définition du format des paragraphes +\setlength{\parskip}{0.5em} + +% Format des titres utilisés dans le préambule du rapport (Auteurs, résumé...) +\newcommand{\titrepreambule}[1]{ + \vspace{2\baselineskip} + {\sffamily\Large\color{titreColor}\scshape{#1}} + \vspace{\baselineskip}} + +% Replace hyphen by bullet in list +\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{% + \section*{\listtablename}% + \@starttoc{lot}% +} +\renewcommand\listoffigures{% + \section*{\listfigurename}% + \@starttoc{lof}% +} +\makeatother diff --git a/inst/templates/inrae/reseaux_sociaux.png b/inst/templates/inrae/reseaux_sociaux.png new file mode 100644 index 0000000000000000000000000000000000000000..0cea2e19378c1bb6f2ede057a830695fca242a1a Binary files /dev/null and b/inst/templates/inrae/reseaux_sociaux.png differ diff --git a/inst/templates/setup.R b/inst/templates/setup.R new file mode 100644 index 0000000000000000000000000000000000000000..d042754cb3f7da0001501941b4e5082117095000 --- /dev/null +++ b/inst/templates/setup.R @@ -0,0 +1,31 @@ +################################ +# Global setup for all reports # +################################ + +# Settings defined here can be overridden in `setup.R` of each report + +#Remove messages from readr on column type guessing +options(readr.show_col_types = FALSE) + +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.width = 6, # Graphic settings from https://r4ds.had.co.nz/graphics-for-communication.html?q=fig.asp#figure-sizing + fig.asp = 0.618, + out.width = "70%", + fig.align = "center", + echo = FALSE, + warning = FALSE, + message = FALSE, + cache = TRUE, + cache.lazy = FALSE, # https://stackoverflow.com/questions/39417003/long-vectors-not-supported-yet-error-in-rmd-but-not-in-r-script, + always_allow_html = TRUE +) + +if (Sys.getenv("CACHE_CI") != "") { + knitr::opts_chunk$set( + cache.path = file.path(Sys.getenv("CACHE_CI"), + dirname(getwd()), + knitr::opts_chunk$get("cache.path")) + ) +} diff --git a/inst/templates/umr_geau/logo_umr_geau.png b/inst/templates/umr_geau/logo_umr_geau.png new file mode 100644 index 0000000000000000000000000000000000000000..6f70700bc70997684db7ef17f28ed61f4bf0f50f Binary files /dev/null and b/inst/templates/umr_geau/logo_umr_geau.png differ diff --git a/inst/templates/umr_geau/logos.tex b/inst/templates/umr_geau/logos.tex new file mode 100644 index 0000000000000000000000000000000000000000..0d398a9a651cf699c818734de21e060197f1ab62 --- /dev/null +++ b/inst/templates/umr_geau/logos.tex @@ -0,0 +1,19 @@ +% Example of logos layout for page "cover_inrae.tex" + +\hfill +\includegraphics[width=4cm]{../inrae/logo_inrae_couv_haut.png} + +\vspace{3mm} + +\hfill +\includegraphics[width=4cm]{../umr_geau/logo_umr_geau.png} + +\vspace{3mm} + +\hfill +% \includegraphics[width=4cm]{../../templates/inrae/emplacement_logo.jpg} + +\vspace{3mm} + +\hfill +% \includegraphics[width=4cm]{../../templates/inrae/emplacement_logo.jpg} diff --git a/inst/templates/umr_geau/preamble.tex b/inst/templates/umr_geau/preamble.tex new file mode 100644 index 0000000000000000000000000000000000000000..89cad8fdabedfea519bfa67cfe78252157713c94 --- /dev/null +++ b/inst/templates/umr_geau/preamble.tex @@ -0,0 +1,29 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BEGIN PREAMBLE.TEX +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\usepackage[french]{babel} + +\newcommand{\insertsecondlogo}{\includegraphics[width=4cm]{../../templates/umr_geau/logo_umr_geau.png}} +\newcommand{\insertthirdlogo}{} +\newcommand{\insertfourthlogo}{} + +\newcommand{\service}{UMR G-EAU} +\newcommand{\site}{ + UMR G-EAU + + Inrae, Montpellier +} +% Adresse du site +\newcommand{\adresse}{361 rue J-F Breton - BP 5095\\34196 Montpellier cedex 5} +% Téléphone et télécopie +\newcommand{\telephone}{tél. : +33(0)4670400} +\newcommand{\website}{\url{www.g-eau.fr} \\ +\url{www.inrae.fr} +} + +\input{../../templates/inrae/preambule_inrae.tex} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% END PREAMBLE.TEX +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%