forked from helenea/phd-thesis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyClass.cls
More file actions
149 lines (123 loc) · 4.18 KB
/
Copy pathmyClass.cls
File metadata and controls
149 lines (123 loc) · 4.18 KB
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myClass}
\LoadClass[french,a4paper,12pt,twoside,openright]{book}
%%% Language
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{blindtext} % pour générer le lorem ipsum
%%% Colors
\usepackage[x11names]{xcolor}
\definecolor{blueTitles}{RGB}{0,90,154}
\definecolor{greyNumbers}{rgb}{0.5,0.5,0.5}
%%% Page layout
\usepackage[margin=2.5cm]{geometry}
\setlength{\parindent}{0pt} % enlève les alinéas en début de paragraphe
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{tikz}
\usepackage[absolute]{textpos}
\usepackage{etoolbox}
\usepackage{cite}
\usepackage{pdfpages}
%%% Font style
\renewcommand{\familydefault}{lmss}
\usepackage{quoting}
%%% Math
\usepackage{mathtools}
\usepackage{physics}
\everymath{\displaystyle}
\usepackage{gensymb}
\usepackage{xfrac}
\usepackage{algorithm}
\usepackage{algorithmic}
%%% Tables
\usepackage{float}
\usepackage{multirow}
\usepackage{makecell}
\setcellgapes[t]{3pt}
\renewcommand{\theadfont}{\footnotesize\bfseries}
\renewcommand{\theadgape}{}
%%% PAGE STYLE %%%
\newcommand*\blankpage{\newpage\null\thispagestyle{empty}\newpage\thispagestyle{empty}}
\usepackage[titles]{tocloft}
\usepackage[nottoc]{tocbibind}
%% Sectioning
\usepackage{sectsty} % need to be used before titlesec and fncychap otherwise overwrites them
\allsectionsfont{\color{blueTitles}}
\paragraphfont{\itshape\color{blueTitles}}
\subparagraphfont{\color{black}}
\usepackage{titlesec} % for texlive on Ubuntu 16.04, need to run "sudo wget http://mirrors.ctan.org/macros/latex/contrib/titlesec/titlesec.sty -O /usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty" for the sections to be numbered
%% Parts titles
\titleformat{\part}[display] % command and shape
{\thispagestyle{empty}\Huge\bfseries\centering} % format
{\fontsize{200}{80}\usefont{OT1}{pzc}{m}{n}\selectfont\color{greyNumbers}\thepart} % label
{1em} % sep
{\titlerule\vspace{0.5em}\color{blueTitles}} % before code
[\color{black}\vspace{0.5em}\titlerule] % after code
%% Chapters titles
\usepackage[Rejne]{fncychap}
\ChNameAsIs
\ChNameVar{\centering\Large\bfseries\color{greyNumbers}}
\ChNumVar{\fontsize{38}{0}\selectfont\color{greyNumbers}}
\ChTitleAsIs
\ChTitleVar{\centering\LARGE\bfseries\color{blueTitles}}
%% Headers and footers for the different page types
\usepackage{titleps}
% Chapter pages
\newpagestyle{plainNormal}[]{
\setfoot[][][]
{}{\toptitlemarks Partie \thepart\ - \parttitle}{\textbf{\thepage}}
\renewcommand{\makefootrule}{%
\rule[.9\baselineskip]{\linewidth}{0.4pt}
}
}
% Content pages inside chapters
\newpagestyle{contentNormal}[]{
\headrule
\sethead[\textbf{\thepage}][\toptitlemarks Partie \thepart\ - \parttitle][]
{}{\toptitlemarks \chaptername\ \thechapter\ - \chaptertitle}{\textbf{\thepage}}
\settitlemarks{part,chapter}
}
% Chapter pages of starred parts (add style manually after chapter command)
\newpagestyle{plainStarred}[]{
\setfoot[][][]
{}{\toptitlemarks \parttitle}{\textbf{\thepage}}
\renewcommand{\makefootrule}{%
\rule[.9\baselineskip]{\linewidth}{0.4pt}
}
}
% Content pages inside starred parts
\newpagestyle{contentStarred}[]{
\headrule
\sethead[\textbf{\thepage}][\toptitlemarks \parttitle][]
{}{\toptitlemarks \chaptername\ \thechapter\ - \chaptertitle}{\textbf{\thepage}}
\settitlemarks{part,chapter}
}
% Chapter pages of frontmatter (add style manually after chapter command)
\renewpagestyle{plain}[]{
\setfoot[][][]
{}{}{\textbf{\thepage}}
\renewcommand{\makefootrule}{%
\rule[.9\baselineskip]{\linewidth}{0.4pt}
}
}
% Content pages inside frontmatter and backmatter chapters
\newpagestyle{contentFrontBackmatter}[]{
\headrule
\sethead[\textbf{\thepage}][\toptitlemarks \chaptertitle][]
{}{\toptitlemarks \chaptertitle}{\textbf{\thepage}}
\settitlemarks{part,chapter}
}
% Content pages inside appendices chapters
\newpagestyle{contentAppendix}[]{
\headrule
\sethead[\textbf{\thepage}][\toptitlemarks \parttitle][]
{}{\toptitlemarks Annexe \thechapter\ - \chaptertitle}{\textbf{\thepage}}
\settitlemarks{part,chapter}
}
\pagestyle{contentNormal}
%%% REFERENCING %%%
\usepackage[hidelinks,linktoc=all,backref=true]{hyperref}
\usepackage[french,nameinlink]{cleveref}