-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsupaero-orga.cls
215 lines (174 loc) · 5.34 KB
/
supaero-orga.cls
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
%% ISAE/SUPAERO document class for event org.
%% C. Garion, 2011
%%
%% Mostly taken from article.cls and "Rolling your own Document Class:
%% Using LaTeX to keep away from the Dark Side" by Peter Flynn
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{supaero-orga}[2011/12/14 v0.1
LaTeX document class for ISAE event organization]
% defs etc.
\def\@language{english}
\def\@requirefrench{}
\DeclareOption{fr}{\def\@language{french}\def\@requirefrench{true}}
\DeclareOption{en}{\def\@language{english}}
\DeclareOption{fr-en}{\def\@language{english,french}\def\@requirefrench{true}}
\DeclareOption{en-fr}{\def\@language{french,english}}
\def\@requirebiblatex{}
\DeclareOption{biblatex}{\def\@requirebiblatex{true}}
\global\let\lieu@internal\@empty
\newcommand{\lieu}[1]{\def\lieu@internal{#1}}
\global\let\pbscientifique@internal\@empty
\newcommand{\pbscientifique}[1]{\def\pbscientifique@internal{#1}}
\global\let\nbpart@internal\@empty
\newcommand{\nbpart}[1]{\def\nbpart@internal{#1}}
\global\let\moyens@internal\@empty
\newcommand{\moyens}[1]{\def\moyens@internal{#1}}
\def\textlhead@other@internal{ISAE}
\newcommand{\textlheadother}[1]{\renewcommand{\textlhead@other@internal}{#1}}
\def\textrhead@other@internal{\shorttitle , \@author}
\newcommand{\textrheadother}[1]{\renewcommand{\textrhead@other@internal}{#1}}
% This class extends the article class
% Read all the documentclass options; pass them to article,
% unless the file "<currentoption>.sup" exists, then it is loaded
\DeclareOption*{\InputIfFileExists{\CurrentOption.sup}{}{%
\PassOptionsToClass{\CurrentOption}{article}}}
\ExecuteOptions{a4paper,11pt}
\ProcessOptions \relax
\RequirePackage{atbegshi}
\LoadClass{article}
% page layout
\RequirePackage[hscale=0.85, vscale=0.92,
top=20pt, includeheadfoot]{geometry}
% fonts
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
% babel for languages. Beamer uses translator package for theorem
% etc. names.
\RequirePackage[\@language]{babel}
\ifx\@requirefrench\@empty
\RequirePackage{xspace}
\else
\RequirePackage{ae,aecompl,aeguill}
\frenchbsetup{ItemLabels=\textendash}
\fi
% microtype for spacing
\RequirePackage[babel=true,kerning=true]{microtype}
\SetExtraKerning%
[ name = ttkerning,%
context = french]%
{ encoding = {OT1,T1}, family={ul9,fvm,tt*} }%
{ }%
% insert logos
\RequirePackage[pdftex]{graphicx}
% bibliography with biblatex
\ifx\@requirebiblatex\@empty
\relax
\else
\RequirePackage[babel]{csquotes}
\RequirePackage[
style=numeric%
]{biblatex}
\fi
% title page
\renewenvironment{titlepage}
{%
\@restonecolfalse\newpage
\setcounter{page}\@ne
}%
\renewcommand\title{\@dblarg\mytitlecmd}
\long\def\mytitlecmd[#1]#2{%
\def\mytitle{#2}%
\def\shorttitle{#1}%
}
\renewcommand\maketitle{
\begin{titlepage}
\null
\vskip 20\p@
\begin{center}%
{\bf \huge \mytitle \par}%
\end{center}
\vskip 10\p@
\hbox{\parbox{\textwidth}{\centering\huge \@author}}
\vskip 50\p@
\noindent\rule{\linewidth}{2pt}
\vskip 10\p@
{
\large
\begin{minipage}[t]{0.35\linewidth}
{\textbf{Date:}}
\end{minipage}
\begin{minipage}[t]{0.6\linewidth}
\@date
\end{minipage}
\vskip 10\p@
\begin{minipage}[t]{0.35\linewidth}
{\textbf{Lieu:}}
\end{minipage}
\begin{minipage}[t]{0.6\linewidth}
\lieu@internal
\end{minipage}
\vskip 10\p@
\begin{minipage}[t]{0.35\linewidth}
{\textbf{Probl\'ematique scientifique:}}
\end{minipage}
\begin{minipage}[t]{0.6\linewidth}
\pbscientifique@internal
\end{minipage}
\vskip 10\p@
\begin{minipage}[t]{0.35\linewidth}
{\textbf{Nombre de participants:}}
\end{minipage}
\begin{minipage}[t]{0.6\linewidth}
\nbpart@internal
\end{minipage}
\vskip 10\p@
\begin{minipage}[t]{0.35\linewidth}
{\textbf{Moyens demand\'es:}}
\end{minipage}
\begin{minipage}[t]{0.6\linewidth}
\moyens@internal
\end{minipage}
}
\vskip 5\p@
\noindent\rule{\linewidth}{2\p@}
\vskip 20\p@
{
\large
{\noindent\textbf{Sommaire:}}
\@starttoc{toc}
}
\newpage
\end{titlepage}
}
% header and footer
\RequirePackage{fancyhdr}
\RequirePackage{lastpage}
\fancypagestyle{firstpage}{%
\fancyhf{}
\lhead{\raggedright\parbox[b]{0.1\headwidth}{\raggedright\includegraphics[width=0.1\headwidth]{isae.png}}}
\chead{\parbox[b]{0.5\headwidth}{\centering\large Demande d'organisation
d'\'ev\'enements}}
\rhead{}
\lfoot{\footnotesize Ce document est la propri\'et\'e de l'ISAE.\\
Les informations qu'il contient ne peuvent \^etre utilis\'ees, reproduites
ou communiqu\'ees sans son accord pr\'ealable \'ecrit.}
\rfoot{\thepage/\pageref{LastPage}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
}
\fancypagestyle{followingpage}{%
\fancyhf{}
\lhead{\raggedright\parbox[b]{0.2\headwidth}{\raggedright\textlhead@other@internal}}
\rhead{\parbox[b]{0.7\headwidth}{\raggedleft\textrhead@other@internal}}
\lfoot{\footnotesize Ce document est la propri\'et\'e de l'ISAE.\\
Les informations qu'il contient ne peuvent \^etre utilis\'ees, reproduites
ou communiqu\'ees sans son accord pr\'ealable \'ecrit.}
\rfoot{\thepage/\pageref{LastPage}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
}
\pagestyle{followingpage}
\AtBeginDocument{\thispagestyle{firstpage}}
% default font
\renewcommand\familydefault{cmss}
\RequirePackage[cm]{sfmath}