-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
440 lines (380 loc) · 15.9 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
\documentclass[titlepage,oneside,letterpaper,openright,12pt]{report}
%%%%%%%%%%%%%%%%%%% COMMENTS %%%%%%%%%%%%%%%%%%%
% 1. To stop numbering the lines, deactivate \linenumbers (activated after loading the package lineno)
%
% 2. To make the index, you need to compile first with lualatex and then use makeindex. Example:
% lualatex main.tex
% makeindex main.nlo -s nomencl.ist -o main.nls
% lualatex main.tex
%
% 3. For the bibliography, use the command biber (as I am using the package biblatex, much more modern than bibtex).
% To use multiple bibliography, use the refsection environment (3.13.3 Multiple Bibliographies in biblatex doc Version 3.13).
% Do not use the chapterbib package with biblatex, there is refsection environment for that!
% Each article will need to use
% \begin{refsection}
% Intro, Methods, Results, Discussion
% \printbibliography[heading=subbibnumbered]
% \end{refsection}
%
% 4. I defined two languages in the document, French and British english (which is the main language), use \begin{french} ... \end{french} to switch to French in a paragraph. I also used the package bicaption that allows for bilingual captions
%
% 5. To avoid multi-defined labels, I recommend to apply this command line in your shell for each tex file of the folders ./article1/, ./article2/, ...:
% sed -i.tmp 's/\\label{/\\label{WHATEVER::/g' *.tex
% This will change all the labels by adding WHATEVER before. Example (adding article1 for each tex file in ./article1/ folder):
% \label{sec::intro} in ./article1/chap1.tex becomes \label{article1::sec::intro}
% sed -i.tmp 's/\\ref{/\\ref{WHATEVER::/g' *.tex
% This will change all the refs by adding WHATEVER before. Example (adding article1 for each tex file in ./article1/ folder):
% \ref{sec::intro} in ./article1/chap1.tex becomes \ref{article1::sec::intro}
% sed -i.tmp 's/\\eqref{/\\eqref{WHATEVER::/g' *.tex
% This will change all the eqrefs by adding WHATEVER before. Example (adding article1 for each tex file in ./article1/ folder):
% \eqref{eq::R0_equation} in ./article1/chap1.tex becomes \eqref{article1::eq::R0_equation}
% sed -i.tmp 's/\\subref{/\\subref{WHATEVER::/g' *.tex
% This will change all the subrefs by adding WHATEVER before. Example (adding article1 for each tex file in ./article1/ folder):
% \eqref{eq::R0_equation} in ./article1/chap1.tex becomes \eqref{article1::eq::R0_equation}
%
% For safety reasons, the original file will be kept in a temporary file '.tmp'. Example:
% sed -i.tmp 'Your instructions here' introduction.tex will create two files:
% introduction.tex which should be the one to keep (if no mistakes in the sed instructions)
% introduction.tex.tmp which is the original file (that you can dump if sed behaved the way you expected)
% For an introduction to the power of sed and regular expressions: https://www.grymoire.com/Unix/Sed.html#uh-1
%
% 6. I defined some colours in this document. Except RdeepBlue, none of them is used in this template and can be deleted.
% If you delete RdeepBlue, do not forget to adapt all the commands using this colour
%%%%%%%%%%%%%%%%%%% PACKAGES %%%%%%%%%%%%%%%%%%%
%%%% font
\usepackage{fontspec}
\usepackage{marvosym}
\usepackage{fontawesome5}
%%%% Language
\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\setotherlanguages{french}
%%%% Date
\usepackage{datetime}
\newdateformat{monthyeardate}{\monthname[\THEMONTH] \THEYEAR}
%%%% marges, space, titles...
\usepackage[top=3.75cm, bottom=2.5cm, left=3cm, right=2.5cm]{geometry}
\usepackage{setspace}
\onehalfspacing
\setlength{\parindent}{0ex} % indentation au début de chaque paragraphe
\setlength{\parskip}{3ex plus 0.5ex minus 0.2ex} % espace vertical entre paragraphes
\usepackage{titlesec}
\newcommand\chapterstring{CHAPITRE}
\titleformat{\chapter}[display]{\vspace{-8em}\center\bfseries}{\chapterstring~\thechapter}{12pt}{}[\vspace{1.5ex}]
\titleformat{\section}{\vspace{0mm plus 2cm}\addpenalty{-1000}\bfseries\sffamily}{\thesection}{1em}{}
\titleformat{\subsection}{\addpenalty{-500}\bfseries\sffamily}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\penalty-500\vspace{0pt plus 2pt}{}\bfseries\sffamily}{\thesubsubsection}{}{}[\vspace{-14pt}]
\usepackage{titletoc}
\titlecontents{chapter}[0pt]{}{\bfseries\chapterstring~\thecontentslabel~}{\bfseries}{\hspace{1em plus 1fill}\contentspage}
\dottedcontents{section}[5.5em]{}{3.2em}{1pc}
\dottedcontents{figure}[5.5em]{}{3.2em}{1pc}
\dottedcontents{table}[5.5em]{}{3.2em}{1pc}
%%%% Appendix
\usepackage{appendix}
%% Start of subappendices environment
% \AtBeginEnvironment{subappendices}{%
% \chapter*{Appendix}
% \addcontentsline{toc}{chapter}{Appendices}
% \counterwithin{figure}{section}
% \counterwithin{table}{section}
% }
% %% End of subappendices environment
% \AtEndEnvironment{subappendices}{%
% \counterwithout{figure}{section}
% \counterwithout{table}{section}
% }
%%%% Graphics
%% To compile with lualatex
\usepackage[luatex]{graphicx}
%% Graphics' path, but I prefer to use absolute path for safety
% \graphicspath{{./article1/}{./article2/}{article3/}}
%% Numbering figures in sections rather than continuously
\usepackage{chngcntr}
\counterwithin{figure}{section}
%% Put figures within their declaration section
\usepackage[section]{placeins}
%% To create multi-figures
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[list=off]{bicaption}
\usepackage{subcaption}
\captionsetup{subrefformat=parens}
%% Colours
\usepackage[dvipsnames, svgnames]{xcolor}
\definecolor{Rblack}{RGB}{0,0,0}
\definecolor{Rgrey}{RGB}{42,51,68}
\definecolor{RdeepBlue}{RGB}{17,34,170}
\definecolor{RmidBlue}{RGB}{32,88,220}
\definecolor{RlightBlue}{RGB}{90,130,234}
\definecolor{RuglyGreen}{RGB}{253,236,190}
\definecolor{RyellowPea}{RGB}{253,219,91}
\definecolor{RdeepYellow}{RGB}{250,185,53}
\definecolor{Rsalmon}{RGB}{253,152,89}
\definecolor{Rred}{RGB}{182,52,58}
\definecolor{lightAvailability_grey}{RGB}{20,20,20}
%% Tikz
\usepackage{tikz}
\usepackage{pgfplots}
%%%% Tab, list...
%% Best package for tables
\usepackage{booktabs}
%% List
\usepackage{enumerate}
\usepackage{enumitem} % http://ctan.org/pkg/enumitem
\SetEnumitemKey{diagSep}{topsep=0pt, partopsep=0pt} % Used in the acknowledgements only, can be removed safely
%% Nomenclature (containing three sections: Acronyms, greek symbols, roman symbols) https://tex.stackexchange.com/questions/452107/nomenclature-having-two-or-more-descriptions-and-units-for-a-symbol
\usepackage[intoc, refpage]{nomencl}
%% Change caption entries to whatever you want (also done in the ToC)
\addto\captionsenglish{ % Replace "english" with the language you use, if you use babel you might have to replace english by british or USenglish
\renewcommand{\contentsname}{TABLE DES MATIÈRES}
\renewcommand{\listtablename}{LISTE DES TABLEAUX}
\renewcommand{\listfigurename}{LISTE DES FIGURES}
\renewcommand{\listtheoremname}{LISTE DES DÉFINITIONS}
}
%%%% Pseudo-code typing
\usepackage[algoruled,vlined]{algorithm2e}
%%%% Links
\usepackage{url}
\usepackage[luatex, colorlinks=true, linkcolor=black, urlcolor=RdeepBlue, citecolor=RdeepBlue]{hyperref}
%%%% Bibliography and table of contents
%% Bibliography output using biblatex
\usepackage{csquotes}
\usepackage[uniquelist=false, backend=biber, citestyle=authoryear-comp, sorting=ynt, giveninits=true, hyperref, natbib, url=false, doi=false, eprint=false, isbn=false, maxbibnames=25, maxcitenames=1, mincitenames=1, useprefix=true]{biblatex}
\addbibresource{phd.bib}
\DeclareFieldFormat{labelnumberwidth}{} % To not print the number in the bibliography list
\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}} % Change "THIS IS A TITLE" to "This is a title". If this does not work, check your bibfile: a double {{...}} protects from modifying the caps
\DefineBibliographyExtras{french}{\renewcommand*\mkbibnamefamily[1]{#1}} % To prevent french language to capitalised titles
%% Table of content (= ToC)
\usepackage[nottoc]{tocbibind}
%%%% Mathematics
\usepackage{amsthm}
\usepackage{amsmath}
\allowdisplaybreaks % allows breaks between pages in formula
\usepackage{amssymb}
\usepackage{bbold}
\usepackage{dsfont}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{xfrac}
\usepackage{etoolbox} % For renumbering
\usepackage{thmbox} % For "theorem" definitions
\usepackage{gensymb}
\usepackage{siunitx}
\sisetup{
inter-unit-product=\ensuremath{{}\cdot{}},
per-mode=symbol
}
\usepackage{thmtools} % To list theorems in ToC
\DeclareMathOperator{\logit}{logit}
%%%% Line numbers --conflict with amsthm-- pdf http://texblog.org/2012/02/08/adding-line-numbers-to-documents/
\usepackage{lineno}
\linenumbers
%%%%%%%%%%%%%%%%%%%%% OTHERS %%%%%%%%%%%%%%%%%%%%%
% http://tex.stackexchange.com/questions/13304/which-package-version-am-i-using
\listfiles % Add \listfiles to your preamble and then look at the .log file. This will tell you the current version of all the packages loaded
%%%%%%%%%%%%%%%%%%%%% NOMENCLATURE CODING %%%%%%%%%%%%%%%%%%%%%
\makenomenclature
\renewcommand{\nomname}{LISTE DES ABBRÉVIATIONS}
\ExplSyntaxOn
\RenewDocumentCommand\nomgroup{m}
{
\item[\textbf{\textcolor{RdeepBlue}{\choosenomgroup{#1}}}]
}
\NewDocumentCommand{\choosenomgroup}{m}
{
\str_case:nn { #1 }
{
{A}{Acronymes}
{L}{Symboles~latins}
{G}{Symboles~grecs}
}
}
\ExplSyntaxOff
\renewcommand*{\nompreamble}{\markboth{\nomname}{\nomname}}
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}\si{#1}}%
}
%%%%%%%%%%%%%%%%%% HYPHENATION %%%%%%%%%%%%%%%%%%
%%%% If latex has troubles to split a word, you can teach it here
\hyphenation{in-teg-ro-dif-fer-ence}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% NEW COMMANDS USER'S SPECIFIC %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% Commands that will be apply to the whole Ph.D. For chapter specific commands, declare them in the chapters (and use renewcommand if a name is used twice)
%%%% Text commands
\newcommand {\ie}{\textit{i.e., }}
\newcommand {\eg}{\textit{e.g., }}
\newcommand {\cf}{\textit{cf} }
\providecommand{\keywords}[1]{\textbf{Mots-clefs:} #1}
%%%% Tikz
%% Libraries (specific tikz commands are in article*/main.tex files)
\usetikzlibrary{arrows, plotmarks, decorations.markings}
\tikzstyle{arrow} = [->,>=Latex,thick,rounded corners=4pt,line width=1pt]
\usetikzlibrary{shadows}
\usetikzlibrary{shadings}
\usetikzlibrary{positioning} % relative coodinate
\usetikzlibrary{tikzmark, calc} % calc, to calculate coordinate
\usetikzlibrary{decorations.pathmorphing} % to snake an arrow
\usetikzlibrary{shapes.arrows}
\usetikzlibrary{arrows.meta} % For style latex, Latex, etc...
\usetikzlibrary{patterns}
\usetikzlibrary{graphdrawing}
\usegdlibrary{trees, layered} % Load the algos "tree" and "layered" for drawing graphs
\usetikzlibrary{graphs}
% \usetikzlibrary{quotes} % https://tex.stackexchange.com/questions/310207/label-on-edges-with-tikz-graph
%% Gradient shadings command
\makeatletter
\def\createshadingfromlist#1#2#3{%
\pgfutil@tempcnta=0\relax
\pgfutil@for\pgf@tmp:={#3}\do{\advance\pgfutil@tempcnta by1}%
\ifnum\pgfutil@tempcnta=1\relax%
\edef\pgf@spec{color(0)=(#3);color(100)=(#3)}%
\else%
\pgfmathparse{50/(\pgfutil@tempcnta-1)}\let\pgf@step=\pgfmathresult%
\pgfutil@tempcntb=1\relax%
\pgfutil@for\pgf@tmp:={#3}\do{%
\ifnum\pgfutil@tempcntb=1\relax%
\edef\pgf@spec{color(0)=(\pgf@tmp);color(25)=(\pgf@tmp)}%
\else%
\ifnum\pgfutil@tempcntb<\pgfutil@tempcnta\relax%
\pgfmathparse{25+\pgf@step/4+(\pgfutil@tempcntb-1)*\pgf@step}%
\edef\pgf@spec{\pgf@spec;color(\pgfmathresult)=(\pgf@tmp)}%
\else%
\edef\pgf@spec{\pgf@spec;color(75)=(\pgf@tmp);color(100)=(\pgf@tmp)}%
\fi%
\fi%
\advance\pgfutil@tempcntb by1\relax%
}%
\fi%
\csname pgfdeclare#2shading\endcsname{#1}{100}\pgf@spec%
}
%%%%%%%% Math commands
%%%% Maths
\newcommand {\s}{{s}^{*}}
\newcommand {\sst}{\tilde{s}^{*}} % s* stable d'où le st
\newcommand {\N}{\tilde{N}}
\newcommand {\A}{\mathscr{A}}
\newcommand {\K}{\mathcal{K}}
\renewcommand{\S}{\mathscr{S}}
\newcommand{\R}{\mathds{R}}
\newcommand{\Prob}{\mathds{P}}
\newcommand{\F}{\mathcal{F}}
%%%% Theorem style
\newtheoremstyle{theo}{\topsep}{\topsep}{\itshape}{}{\bfseries}{.}{\newline}{\thmname{#1} \thmnumber{#2} \thmnote{~: \textit{#3}}}
\theoremstyle{theo}
\newtheorem{rem}{Remark}[section]
\newtheorem{defi}{Definition}[section]
\newtheorem{assum}{Assumption}[section]
\newtheorem{nota}{Notation}[section]
%%%%%%%%%%%%%%%%%%%%% BEGIN DOCUMENT %%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%% Starts by a blank page
\newpage
\thispagestyle{empty}
\mbox{}
%%%% Title page
\begin{titlepage}
\begin{center}
\textsc{A theoretical investigation of the key drivers influencing trees' range limits and their migration rates} \\
\vspace{2cm}
par \\
\vspace{2cm}
Amaël Le Squin
\vspace{1cm}
Université de Sherbrooke \\
\vspace{1cm}
Thèse présentée au Département de biologie en vue \\
de l'obtention du grade de docteur ès sciences (Ph.D.)
\vfill
\textsc{faculté des sciences} \\
\textsc{université de sherbrooke} \\
\vspace{2cm}
Sherbrooke, Québec, Canada, \begin{french} \monthyeardate\today \end{french}
\end{center}
\end{titlepage}
%%%% Jury page (and not Jimmy page...)
\thispagestyle{empty}
\begin{center}
\begin{french}
Le \today \\
\vspace{1cm}
\textit{Le jury a accepté la thèse d'Amaël Le Squin dans sa version finale} \\
\vspace{1cm}
Membre du jury \\
\vspace{1cm}
Professeur Dominique Gravel \\
Directeur de recherche \\
Département de biologie \\
Université de Sherbrooke \\
\vspace{1cm}
Professeure Isabelle Boulangeat \\
Codirectrice de recherche \\
IRSTEA \\
\vspace{1cm}
Professeur Prénom et nom \\
Évaluatrice ou Évaluateur externe \\
Département nom \\
Nom de l'institution \\
\vspace{1cm}
Professeure Prénom et nom \\
Évaluatrice ou Évaluateur interne \\
Département nom \\
Nom de l'institution \\
\vspace{1cm}
Professeure Prénom et nom \\
Président-rapporteur \\
Département de biologie \\
Université de Sherbrooke
\end{french}
\end{center}
%%%% From abstract (included) to Introduction (excluded)
%% Start roman numbering
\pagenumbering{roman}
\input{abstract_fr}
\input{abstract_en}
\input{acknowledgements}
%% Table of contents
\tableofcontents
%% Nomencalture
\printnomenclature
%% List of tables
\listoftables
%% List of figures
\listoffigures
%% List of defintions ---> Requires the package thmtools
\listoftheorems[ignoreall, onlynamed={defi}]
\newpage
%%%% Main body
%% Start arabic numbering
\pagenumbering{arabic}
%% Input chapters
\begin{french}
\input{./introduction_fr}
\end{french}
% \input{./introduction}
% \input{./article1/main}
% \input{./article3/main}
\chapter{Examples of nomenclature commands}
In this section we adapt EBT\nomenclature[A]{EBT}{Escalator Boxcar Train} to spatial PSPMs, with the space $ \Gamma $\nomenclature[G]{$ \Gamma $}{Physical space, $ \Gamma \subset \R^2 $ bounded} discretised such that $ \Gamma = \bigcup_{k} \gamma_k $. The growth speed of trees is $ G $\nomenclature[L]{$ G $}{Individual tree growth \nomunit{\metre\per\second}}. Actually, I changed my mind and now G stands for the Galapagos Islands\nomenclature[L]{G}{The Galapagos Islands}.
% \input{./discussion}
\begin{refcontext}[sorting = nyt]
\printbibliography[heading = bibintoc, title = BIBLIOGRAPHIE]
\end{refcontext}
\renewcommand{\chapterstring}{ANNEXE}
\titlecontents{chapter}[0pt]{}{\bfseries ANNEXE~\thecontentslabel~}{\bfseries}{\hspace{1em plus 1fill}\contentspage}
\begin{appendices}
\chapter{Introduction générale (Chapter \ref{chap::intro})}
\input{appendices/app_intro.tex}
\chapter{Climate-induced variation in the demography of 14 tree species is not sufficient to explain their distribution in eastern North America (Chapter \ref{chap::article1})}
% \input{article1/appendices/app_S1}
% \input{article1/appendices/app_S2}
% \input{article1/appendices/app_S3}
% \input{article1/appendices/app_S4}
% \input{article1/appendices/app_S5}
% \input{article1/appendices/app_S6}
% \chapter{Article 2}
\end{appendices}
%%%% Ends by a blank page, congrats!
\newpage
\thispagestyle{empty}
\mbox{}
\end{document}