-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathimta_documentation.tex
306 lines (221 loc) · 14.3 KB
/
imta_documentation.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% File Name: imta_documentation
%
% Description: documentation of the IMT Atlantique LaTeX Template.
%
% Note: /
%
% Limitations: /
%
% Errors: None known
%
% Dependencies: babel
% biblatex
% imta_core
% imta_extra
%
% Author: A. Foucault - [email protected]
% Contributors: B. Porteboeuf - [email protected]
%
% University : IMT Atlantique, Brest (France)
%
% TeX Environment: TeXLive + pdfLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{report}
\usepackage[english]{babel}
\usepackage{imta_core}
\usepackage{imta_extra}
\author{FOUCAULT Armand\\PORTEBOEUF Benoît}
%\imtaAuthorShort{A. Foucault \& B. Porteboeuf}
\date{December 2017}
\title{Institut Mines-Télécom Atlantique - \LaTeX{} report template}
\subtitle{Documentation for the \texttt{imta} package}
\imtaSetIMTStyle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% BEGINNING %%%%%%%%%%
\begin{document}
\imtaMaketitlepage
\tableofcontents
\newpage
\chapter{Core features: \texttt{imta\_core}}
\section{Introduction}
The \texttt{imta\_core} package provides a \LaTeX{} template that satisfies the IMT Atlantique corporate identity rules.\footnote{See \textit{\href{https://intranet.imt-atlantique.fr/wp-content/uploads/2017/01/imt_atlantique_chartegraphique.pdf}{Charte Graphique}} on the IMT Atlantique's intranet for more details.} For slightly more advanced or specific features, you might want to refer to the \texttt{imta\_extra} package.
Since it is a package, it can be used for a variety of classes and geometry. It has been primarily designed to be usd in \texttt{article} and \texttt{report} documents, either with \texttt{oneside}/\texttt{twoside} or \texttt{onecolumn}/\texttt{twocolumn} geometries.
\section{Set up}
In order to use this template, you simply need to have a \TeX{} distribution installed, copy this file in your working directory and add the \imtaInlinecode{latex}{\usepackage{imta_core}} command in the preamble of your top document. The \texttt{babel} package should be loaded first when used in combination with \texttt{imta\_core}.
Note that this template is compatible with at least \TeX Live and MiK\TeX distributions, although we have noticed some issues might happen when trying to resolve dependencies with the latter. If so, then try to update your distribution using your Mik\TeX manager.\footnote{See \textit{\href{https://tex.stackexchange.com/a/359851}{General Guide to Installing Packages with MikTeX Package Manager}} on \TeX Stack Exchange for more details.}
\section{Sectioning}
\subsection{\texttt{imtaQuestion} and \texttt{imtaQuestionReset}}
The \imtaInlinecode{latex}{\imtaQuestion} command outputs and formats a question counter.
It's meant to be used in reports for assignment with questions.
The counter should be reset with the \imtaInlinecode{latex}{\imtaQuestionReset}.
This couple of commands is meant to be used for sectioning when the assignment does not use a more explicit titling.
\subsection{\texttt{subsubsubsection}}
The \imtaInlinecode{bash}{imta_core} package offers a one-level-deeper section than the usual deepest \imtaInlinecode{latex}{\subsubsection}.
This provides an alternative to the usual \imtaInlinecode{latex}{\paragraph}.
\subsection{\texttt{chapter}}
The \imtaInlinecode{latex}{\chapter} command has been redefined to print the word "chapter" in front of the figure. This command is compatible with several languages but requires the \texttt{babel} package to be loaded first. The default language is english.
This command also prints a small design on the bottom right corner of the page and updates the upper section title.
\section{Document styling}
\subsection{IMT Atlantique styling}
\subsubsection{Colors}
The core package defines four colors, including the three colors of the IMT Atlantique, and a uniform and arbitrary gray.
These are defined as follows:
\begin{imtaCode}{latex}
\definecolor{imtaGreen}{RGB}{164, 210, 51}
\definecolor{imtaLightBlue}{RGB}{0, 184, 222}
\definecolor{imtaDarkBlue}{RGB}{12, 35, 64}
\definecolor{imtaGray}{RGB}{87, 87, 87}
\end{imtaCode}
Here are samples of these colors, with text in both black and white for previsualising the contrast.
\begin{figure}[H]
\centering
\resizebox{10cm}{!}{%
\begin{tikzpicture}
\fill[color=imtaGray] (0, 9) rectangle (6, 11);
\fill[color=imtaGray] (7, 9) rectangle (13, 11);
\node at (3, 10) {\LARGE \bf imtaGray};
\node[white] at (10, 10) {\LARGE \bf imtaGray};
\fill[color=imtaDarkBlue] (0, 6) rectangle (6, 8);
\fill[color=imtaDarkBlue] (7, 6) rectangle (13, 8);
\node at (3, 7) {\LARGE \bf imtaDarkBlue};
\node[white] at (10, 7) {\LARGE \bf imtaDarkBlue};
\fill[color=imtaLightBlue] (0, 3) rectangle (6, 5);
\fill[color=imtaLightBlue] (7, 3) rectangle (13, 5);
\node at (3, 4) {\LARGE \bf imtaLightBlue};
\node[white] at (10, 4) {\LARGE \bf imtaLightBlue};
\fill[color=imtaGreen] (0, 0) rectangle (6, 2);
\fill[color=imtaGreen] (7, 0) rectangle (13, 2);
\node at (3, 1) {\LARGE \bf imtaGreen};
\node[white] at (10, 1) {\LARGE \bf imtaGreen};
\end{tikzpicture}
}
\caption{Samples of the IMT Atlantique colors}
\label{fig:imtaColors}
\end{figure}
\subsubsection{\texttt{imtaSetIMTStyle}}
The official IMT Atlantique styling is not really \LaTeX-ish, and takes the decision to use a sans-serif font for body text.
Therefore, the default style uses the default \LaTeX{} font settings.
However, it is possible to enable a more IMT Atlantique-compliant styling, by calling the \imtaInlinecode{latex}{\imtaSetIMTStyle} command in the preamble.
The main aspects of the official style are:
\begin{itemize}
\item Use of the Helvetica font for the body;
\item Section titles in green (\imtaInlinecode{latex}{\imtaGreen}) and other heading titles in gray (\imtaInlinecode{latex}{\imtaGray});
\item Section title in the header;
\item Page number at the right corner of the footer.
\end{itemize}
For comparison, the default style of the template is:
\begin{itemize}
\item Use of the default Computer Modern font for the body;
\item Default style for headings: all in black;
\item Document title at the left corner and author's name at the right corner of the header;
\item Page number at the center of the footer.
\end{itemize}
\subsubsection{The IMT Atlantique logo with \texttt{imtaLogo} and \texttt{imtaLogoTikz}}
The IMT Atlantique logo can be output at the desired width with the \imtaInlinecode{latex}{\imtaLogo} command.
The latter includes an external pdf document, \imtaInlinecode{bash}{imta_logo.pdf}, that contains the official logo.
On the other hand, the \imtaInlinecode{latex}{\imtaLogoTikz} draws an approximation of the logo with the \imtaInlinecode{latex}{tikz} package.
The following is a comparison of both commands.
\begin{figure}[H]
\centering
\fbox{\imtaLogo{5cm}}
\fbox{\imtaLogoTikz{5cm}}
\caption{Comparison between \imtaInlinecode{latex}{imtaLogo} and \imtaInlinecode{latex}{imtaLogoTikz}}
\label{fig:imtaLogo}
\end{figure}
\subsubsection{Front cover}
The \texttt{imtaMaketitlepage} command outputs a title page with the names of the authors, the date of writing, and the title of the document, along with the subtitle.
For this latter purpose, the \imtaInlinecode{latex}{\subtitle} command helps define a subtitle as a part of the document's metadata, and %
is used inside of the \imtaInlinecode{latex}{\imtaMaketitlepage} command.
Since the \imtaInlinecode{latex}{\author} command consists of only one field, we recommend to simply add linebreaks when declaring the authors if several people co-author a document. However, should you not use the IMT Atlantique style and would like to print the authors' name on one line in the default header, we introduced the \imtaInlinecode{latex}{\imtaAuthorShort} command which sets the \imtaInlinecode{latex}{\imtaTheAuthorShort} macro. By default, it is equal to the \imtaInlinecode{latex}{\theauthor} command, but can be redefined to be on one line only.
Moreover, you can also add one or several partner's logo on the front cover, next to the one of IMT Atlantique. In order to achieve this, you can simply use the \imtaInlinecode{latex}{\imtaAddPartnerLogo} command in the preamble of your document. The logo will be resized so that its maximum dimension is equal to the corresponding dimension of the IMT Atlantique's logo.
\subsubsection{Back cover}
The \texttt{imtaMakeCover} command outputs a cover as the last page of the document.
This page will always be a left page in a two-side document.
\section{External dependancies}
This package depends upon a number of external packages.
The use of these is explained hereafter, and the parameters each is used with are specified as well.
Furthermore, a code snippet is presented, that shows the import line and the settings of the corresponding package.
\subsection{\texttt{geometry}}
The \imtaInlinecode{latex}{geometry} package provides ways to act on the document's format.
This package defines a A4 format, with two-centimeter margins, and a top margin of an extra centimeter for the header.
\begin{imtaCode}{latex}
\RequirePackage[a4paper, margin=2cm, top=3cm]{geometry}
\end{imtaCode}
\subsection{\texttt{graphicx}}
The \imtaInlinecode{latex}{graphicx} package lets input graphics and pictures into the document.
\begin{imtaCode}{latex}
\RequirePackage{graphicx}
\end{imtaCode}
\subsection{\texttt{fontenc}}
The \imtaInlinecode{latex}{fontenc} package declares an encoding for the output font.
The \imtaInlinecode{bash}{imta_core} package uses a latin font whose encoding is \imtaInlinecode{latex}{T1}.
\begin{imtaCode}{latex}
\RequirePackage[T1]{fontenc}
\end{imtaCode}
\subsection{\texttt{hyperref}}
The \imtaInlinecode{latex}{hyperref} package helps typeset hypertext links.
The \imtaInlinecode{latex}{hidelinks} option hides the links, but keeps them clickable.
To output a hypertext link, use the \imtaInlinecode{latex}{\hyperref} command.
\begin{imtaCode}{latex}
\RequirePackage[hidelinks]{hyperref}
\end{imtaCode}
\subsection{\texttt{inputenc}}
\begin{imtaCode}{latex}
\RequirePackage[utf8]{inputenc}
\end{imtaCode}
\subsection{\texttt{fancyhdr}}
\begin{imtaCode}{latex}
\RequirePackage{fancyhdr}
\end{imtaCode}
\subsection{\texttt{tikz}}
\begin{imtaCode}{latex}
\RequirePackage{tikz}
\end{imtaCode}
\subsection{\texttt{titlesec}}
\begin{imtaCode}{latex}
\RequirePackage{titlesec}
\end{imtaCode}
\subsection{\texttt{titling}}
\begin{imtaCode}{latex}
\RequirePackage{titling}
\end{imtaCode}
\subsection{\texttt{anyfontsize}}
\begin{imtaCode}{latex}
\RequirePackage{anyfontsize}
\end{imtaCode}
\subsection{\texttt{sectsty}}
\begin{imtaCode}{latex}
\RequirePackage{sectsty}
\end{imtaCode}
\subsection{\texttt{etoolbox}}
\begin{imtaCode}{latex}
\RequirePackage{etoolbox}
\end{imtaCode}
\subsection{\texttt{footmisc}}
\begin{imtaCode}{latex}
\RequirePackage[bottom]{footmisc}
\end{imtaCode}
\chapter{Additional features: \texttt{imta\_extra}}
\section{Introduction}
While the \texttt{imta\_core} package provides a \LaTeX{} template that satisfies the IMT Atlantique corporate identity rules\footnote{See \textit{\href{https://intranet.imt-atlantique.fr/wp-content/uploads/2017/01/imt_atlantique_chartegraphique.pdf}{Charte Graphique}} on the IMT Atlantique's intranet for more details.} the \texttt{imta\_extra} package provides the user some slightly more advanced or specific features.
Since it is a package, it can be used for a variety of classes and geometry. It has been primarily designed to be usd in \texttt{article} and \texttt{report} documents, either with \texttt{oneside}/\texttt{twoside} or \texttt{onecolumn}/\texttt{twocolumn} geometries.
\section{Set up}
In order to use this template, you need to have a \TeX{} distribution installed, copy this file as well as \texttt{imta\_core} in your working directory and add the \imtaInlinecode{latex}{\usepackage{imta_extra}} command in the preamble of your top document.
Since \texttt{imta\_extra} uses the \texttt{minted} package for code colouring, two extra steps are necessary to fully resolve dependencies. First, you need to have \texttt{Pygmentize} installed. If this is not the case, you can do it using Python utilitary \texttt{pip} by executing \imtaInlinecode{python}{pip install Pygments}. Finally, you also need to build your document with the correct options. If you are using pdf\LaTeX{} as your compiler, you need to add the \imtaInlinecode{latex}{--shell-escape} option.
Note that this template is compatible with at least \TeX Live and MiK\TeX distributions, although we have noticed some issues might happen when trying to resolve dependencies with the latter. If so, then try to update your distribution using your Mik\TeX manager.\footnote{See \textit{\href{https://tex.stackexchange.com/a/359851}{General Guide to Installing Packages with MikTeX Package Manager}} on \TeX Stack Exchange for more details.}
\section{Document Styling}
\subsection{Code Colouring}
\subsection{Structuring List of Figures and Tables}
In long documents, in can be useful to structure the list of figures or tables by printing the highest section (chapter or section) containing the items. In order to achieve this, the \texttt{figure} and \texttt{table} environments have been redefined, as well as the \texttt{chapter} and \texttt{section} commands. The default behavior is thus to print the upper level section in the list of figures or tables. If you would like to disable this functionalities, you can do it by using the \texttt{nouppersectioninlof} or \texttt{nouppersectioninlot} option when loading the package. Simply type \imtaInlinecode{latex}{\usepackage[<options>]{imta_extra}} in the preamble.
\subsection{Page numbering}
In order to ease the page numbering and differentiate the preamble of your document (front cover, table of contents, list of figures, abstract, etc) from the corpus of your document, we introduced the \imtaInlinecode{latex}{\frontmatter} and \imtaInlinecode{latex}{\mainmatter}. They respectively set the page numbering style to roman or arabic.
\section{External dependancies}
\subsection{\texttt{anyfontsize}}
\subsection{\texttt{imta\_core}}
\subsection{\texttt{mdframed}}
\subsection{\texttt{minted}}
\imtaMakeCover
\end{document}
%%%%%%%%%% END %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%