forked from UCL-INGI/LINGI1123-Calculabilite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ingi1123.sty
231 lines (195 loc) · 6.48 KB
/
ingi1123.sty
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
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{ingi1123}[2018/02/23 INGI1123 style code package]
%Ici les éventuelles options pour le document
\DeclareOption*
{\PackageWarning{ingi1123}{Unknown '\CurrentOption'}}
\ProcessOptions\relax
%-----------------------------
%Les imports de packages
\RequirePackage[
type={CC},
lang={fr},
modifier={by-sa},
version={4.0},
]{doclicense}
\RequirePackage[utf8x]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
\RequirePackage{palatino}
\RequirePackage[francais]{babel} % Pour la langue française
%\RequirePackage{iflang}
\RequirePackage{ifthen}
\RequirePackage{url}
\RequirePackage{hyperref}
\RequirePackage[bottom]{footmisc}
%\RequirePackage{xparse}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{amsthm}
\RequirePackage{esint}
\RequirePackage{esvect}
%%% SECTION TITLE APPEARANCE
\RequirePackage{sectsty}
\allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)
% (This matches ConTeXt defaults)
% Color
% cfr http://en.wikibooks.org/wiki/LaTeX/Colors
\RequirePackage{color}
\RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor}
\RequirePackage{pdfpages}
% http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Subfloats
\RequirePackage{caption}
\RequirePackage{subcaption}
%Toujours mettre enumerate AVANT enumitem
\RequirePackage{enumerate}
\RequirePackage{enumitem}
\RequirePackage{desclist}
\RequirePackage{algorithm}
\RequirePackage{algorithmic}
\RequirePackage{listings}
\RequirePackage{graphicx}
\RequirePackage{tikz}
\RequirePackage[left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
%-----------------------------
%Configuration des packages
\usetikzlibrary{shapes}
%Configuration de listings
\lstset{
language=Oz,
numbers=left,
numberstyle=\tiny\color{gray},
basicstyle=\rm\small\ttfamily,
morekeywords=[2]{while,do},
keywordstyle={\bfseries\color{dkred}},
keywordstyle=[2]{\bfseries\color{mymauve}},
frame=single,
commentstyle=\color{gray}=small,
stringstyle=\color{dkred},
%backgroundcolor=\color{gray!10},
%tabsize=2,
rulecolor=\color{black!30},
%title=\lstname,
breaklines=true,
framextopmargin=2pt,
framexbottommargin=2pt,
extendedchars=true,
inputencoding=utf8x,
literate=
{á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
{Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
{à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
{À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
{ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
{Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
{â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
{Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
{œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
{ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1
{ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
{€}{{\EUR}}1 {£}{{\pounds}}1
}
%-----------------------------
%Nouvelles commandes
\newcommand{\ellipse}[3]% center, xdim, ydim
{(#1) ellipse (#2 and #3)}
\setlist[itemize]{topsep=3pt,after=\vspace{.5\baselineskip}}
\setlength{\parskip}{2mm}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\definecolor{dkgreen}{rgb}{0.25,0.7,0.35}
\definecolor{dkred}{rgb}{0.7,0,0}
\newcommand{\stcomp}[1]{\overline{#1}}
% Make the style indentedefinition use bold for the name of the theorem
\makeatletter
\def\th@indenteddefinition{%
\thm@notefont{}% same as heading font
\normalfont % body font
}
\makeatother
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\image}{image}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\interpret}{interpret}
% Always prettier with Small Capitals
% But use this command so if the definition of `pretty' changes
% we will just have to update here.
\newcommand{\matlab}{\textsc{Matlab}}
\newcommand{\octave}{\textsc{GNU/Octave}}
\newcommand{\qtoctave}{\textsc{QtOctave}}
\newcommand{\oz}{\textsc{Oz}}
\newcommand{\java}{\textsc{Java}}
\newcommand{\clang}{\textsc{C}}
% Math symbols
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator{\arcsinh}{arcsinh}
\DeclareMathOperator{\arctanh}{arctanh}
\newcommand{\Tr}{\top}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\newcommand{\suchthat}{\ |\ }
% Norm & absolute value, because ||x|| is ugly
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\abs}[1]{\left\lvert#1\right\lvert}
% Sets
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Rn}{\R^n}
\newcommand{\Rnn}{\R^{n \times n}}
\ifdefined\C
\renewcommand{\C}{\mathbb{C}}
\else
\newcommand{\C}{\mathbb{C}}
\fi
\newcommand{\K}{\mathbb{K}}
\newcommand{\Kn}{\K^n}
\newcommand{\Knn}{\K^{n \times n}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
% Unit vectors
\newcommand{\kmath}{k}
\newcommand{\xunit}{\hat{\imath}}
\newcommand{\yunit}{\hat{\jmath}}
\newcommand{\zunit}{\hat{\kmath}}
% rot & div & grad & lap
\DeclareMathOperator{\newdiv}{div}
\newcommand{\divn}[1]{\nabla \cdot #1}
\newcommand{\rotn}[1]{\nabla \times #1}
\newcommand{\grad}[1]{\nabla #1}
\newcommand{\gradn}[1]{\nabla #1}
\newcommand{\lap}[1]{\nabla^2 #1}
% Complexity
\newcommand{\bigoh}{\mathcal{O}}
% Equal by definition
\newcommand{\eqdef}{\triangleq}
% Equivalent by definition
\newcommand{\equivdef}{\stackrel{\Delta}{\Leftrightarrow}}
% Constant
\newcommand{\constant}{\ensuremath{\mathrm{cst}}}
% Useful for integrals, don't just use \int x^2 dx
% the `d' will be italic and won't have the right spacing!
\DeclareMathOperator{\newdiff}{d} % use \dif instead
\newcommand{\dif}{\newdiff\!}
% It has never been easier to write derivatives !
\newcommand{\fpart}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\ffpart}[2]{\frac{\partial^2 #1}{\partial #2^2}}
\newcommand{\fdpart}[3]{\frac{\partial^2 #1}{\partial #2\partial #3}}
\newcommand{\fdif}[2]{\frac{\dif #1}{\dif #2}}
\newcommand{\ffdif}[2]{\frac{\dif^2 #1}{\dif #2^2}}
\newtheorem{mydef}{Définition}
\newtheorem{mynota}[mydef]{Notation}
\newtheorem{myprop}[mydef]{Propriétés}
\newtheorem{myrem}[mydef]{Remarque}
\newtheorem{myform}[mydef]{Formules}
\newtheorem{mycorr}[mydef]{Corrolaire}
\newtheorem{mytheo}[mydef]{Théorème}
\newtheorem{mylem}[mydef]{Lemme}
\newtheorem{myexem}[mydef]{Exemple}
\newtheorem{myineg}[mydef]{Inégalité}
\newtheorem{mycipher}[mydef]{Cipher}
\newtheorem{myatk}[mydef]{Attaque}
\newtheorem{myprob}{Problème}
\newtheorem{mylaw}{Loi}
\newtheorem{myhyp}{Hypothèse}
\endinput