-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.tex
174 lines (143 loc) · 4.63 KB
/
preamble.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
%------------------------------------------------
% Main configuration and package imports
%------------------------------------------------
% Document class and metrics
\documentclass[a4paper,twoside,11pt,notitlepage]{report} % notitlepage because abstract restarts numbering
% Custom margins
%\usepackage[cm]{fullpage} % Simple thiner margins
\usepackage[left=3cm, right=3cm]{geometry}
% Don't indent paragraphs, instead separate them
\usepackage[parfill]{parskip}
% Encoding and internationalization
\usepackage[francais,english]{babel}
%\usepackage{ucs} % no more used (see http://tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc)
%\usepackage[utf8x]{inputenc}
\usepackage[utf8]{inputenc}
%\usepackage[ansinew]{inputenc} % Windows specific encoding
%\usepackage[latin1]{inputenc} % Linux specific encoding
\usepackage[T1]{fontenc}
% Extra symbols (euro, celsius, ...)
\usepackage{textcomp}
% Math and numerical support
\usepackage{amsmath, amssymb, amsthm}
\usepackage{numprint}
\usepackage{xfrac} % Nice inline fractions
\usepackage{siunitx} % Proper SI units handling
% Fonts
\usepackage{lmodern} % Use latin Modern
\usepackage{courier} % Courier for typewritter
%\usepackage{titlesec}
%\titleformat{\chapter}[display]{\sffamily\huge\bfseries}{}{20pt}{\Huge}
%\titleformat*{\section}{\sffamily}
%\usepackage{sectsty}
%\allsectionsfont{\sffamily}
%\sectionfont{\sffamily}
% Figures, tables and graphics
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{graphicx}
\usepackage{caption}
%\usepackage[font=sf, labelfont={sf,bf}, margin=1cm]{caption}
\usepackage{subcaption} % Subfigures / subtables
\usepackage{floatrow} % For footnotes in figures
%\usepackage[font=sf]{floatrow}
% Captions setup
\floatsetup[table]{capposition=top}
\captionsetup%[table]
{labelfont={sf,bf},textfont={sf,it},labelsep=space} %{format=listing,labelfont=white,textfont=white}
\captionsetup[subfigure]{textfont={sf}}
% Enable to plot graph
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize[shell escape=-enable-write18] % needed for the MiKTeX compiler
\tikzsetexternalprefix{graphs/}
\usepackage{sansmath} % for sans serif math
\pgfplotsset
{
compat = 1.6,
tick label style = {font=\sansmath\sffamily},
every axis label = {font=\sansmath\sffamily},
legend style = {font=\sansmath\sffamily},
label style = {font=\sansmath\sffamily}
}
% Listings handling
\usepackage{listings}
% Better bibliography handling with biblatex/biber
\usepackage{biblatex}
\addbibresource{content/bibliography.bib}
% Add bibliography and lists of xx to the TOC
\usepackage[nottoc]{tocbibind}
%\renewcommand{\lstlistingname}{Listing}
\renewcommand\lstlistlistingname{List of Listings}
\renewcommand{\lstlistoflistings}
{
\begingroup
\tocfile{\lstlistlistingname}{lol}
\endgroup
}
% Advanced appendicies support
\usepackage[toc,page]{appendix}
% Support for internal links
\usepackage{hyperref}
%\usepackage{breakurl} % Fix hyperref line-breaks problem (only with plain old latex compiler)
% Advanced headers options
\usepackage{fancyhdr}
\usepackage{lastpage}
% Advanced arrays features
\usepackage{array}
\usepackage{tabu}
% For paging in landscape mode
\usepackage{pdflscape}
% Glossary support
%\usepackage[xindy][toc]{glossaries}
\usepackage[toc]{glossaries}
\makeglossaries
% To avoid footnotes being splitted in pages
\interfootnotelinepenalty=10000
% Cut words even with texttt font
\usepackage[htt]{hyphenat}
%\newcommand\texttthyph[1]{\begingroup\ttfamily\hyphenchar\font`\-\relax#1\endgroup} % old version
%TODO see also to change the sign
% Leave out page numbers on empty pages
\let\origdoublepage\cleardoublepage
\renewcommand{\cleardoublepage}{%
\clearpage
{\pagestyle{empty}\origdoublepage}%
}
% Metapost support
%\usepackage{emp} % embedded metapost not working yet
\usepackage{ifpdf}
\ifpdf
\DeclareGraphicsRule{*}{mps}{*}{}
\fi
% To add todo notes
\usepackage{todonotes}
%------------------------------------------------
% Custom LaTeX commands
%------------------------------------------------
% Set the document title
\newcommand{\doctitle}{notitle}
\newcommand{\setdoctitle}[1]
{
\renewcommand{\doctitle}{#1}
}
% Set the author name
\newcommand{\authorname}{noname}
\newcommand{\authornamesf}{noname}
\newcommand{\setauthor}[2]
{
\renewcommand{\authorname}{#1~\textsc{#2}}
\renewcommand{\authornamesf}{#1~#2}
}
% Clear double page working in one-sided mode
\newcommand{\cleardoublepageoneside}
{
\newpage
\thispagestyle{empty}
\strut
\newpage
}
% Add mathetmatical operators
\DeclareMathOperator{\src}{src}
\DeclareMathOperator{\dst}{dst}
% To use inline fractions with siunitx
\newcommand{\tsfrac}[2]{\text{\sfrac{#1}{#2}}}