Debian Codegraph @

texmf-dist/doc/latex/upmethodology/upmethodology-doc.tex

raw
1 \documentclass[book,taskpackage,specpackage,codepackage]{upmethodology-document}
2
3 \setfrontcover{classic}
4
5 \declaredocument{\LaTeX\ Packages for Structured Documents as for Unified Process Methodology}{Official Documentation}{UPM-2025-01}
6
7 \updateversion{25.0}{\makedate{14}{03}{2025}}{Update the documentation for the \texttt{declareupmtheorem} command and \texttt{definition} environment.}{\upmpublic}
8 \incsubversion{\makedate{15}{03}{2025}}{Add the mention of the dependency to \texttt{tobibind} in the dependencies of \texttt{upmmethodology-fmt}.}{\upmpublic}
9 \incversion{\makedate{15}{03}{2025}}{Add the commands \texttt{{\textbackslash}defref} and \texttt{{\textbackslash}defpageref}.}{\upmpublic}
10 \incversion{\makedate{15}{03}{2025}}{Add the optional "source text" to the commands \texttt{{\textbackslash}mfigure} and \texttt{{\textbackslash}mfigure*}.}{\upmpublic}
11 \incversion{\makedate{15}{03}{2025}}{Add the commands \texttt{{\textbackslash}addsource} and \texttt{{\textbackslash}tablenote} for the \texttt{mtable} environment.}{\upmpublic}
12 \incversion{\makedate{15}{03}{2025}}{Use the package \texttt{tcolorbox} for implementing \texttt{mtabular} and \texttt{mtable} environments.}{\upmpublic}
13 \incversion{\makedate{23}{03}{2025}}{Add documentation of the algorithms' colors.}{\upmpublic}
14 \incversion{\makedate{06}{04}{2025}}{Add macro \texttt{{\textbackslash}upmcaption}.}{\upmpublic}
15 \incversion{\makedate{12}{04}{2025}}{Replace \texttt{tabularx} by \texttt{xltabular} and table options \texttt{figurecaptionabove} and \texttt{figurecaptionabove}.}{\upmpublic}
16 \incversion{\makedate{20}{04}{2025}}{Extend the internal value definition API.}{\upmpublic}
17 \incsubversion{\makedate{27}{04}{2025}}{Add option \texttt{pgf} for figure commands.}{\upmpublic}
18 \incsubversion{\makedate{27}{04}{2025}}{Include package \texttt{enumitem} for inline enumerations.}{\upmpublic}
19 \incsubversion{\makedate{27}{04}{2025}}{Enable multiple lines the column heads with \texttt{{\textbackslash}tabularheader}.}{\upmpublic}
20 \incversion{\makedate{29}{04}{2025}}{Add environment \texttt{mlongtable}.}{\upmpublic}
21 \incversion{\makedate{06}{04}{2026}}{Update the style of the section titles to support more than one line of text.}{\upmpublic}
22
23 \addauthorvalidator*[[email protected]]{St{\'e}phane}{Galland}{Original Author}
24 \addauthor*{Frans}{van Dunn\'e}{Reviewer}
25
26 \setdockeywords{\LaTeX, Methodology Document Style, User Documentation, Extensible}
27
28 \setdocabstract{The packages in upmethodology enable users to write documents according to Unified Process Methodology or other methodology. It was initially wittren by St\'ephane \textsc{Galland} from the laboratory ``Syst\`emes et Transports'' and is distributed by the \arakhneorg website.}
29
30 \makeatletter
31 \let\VERversion\upm@package@version@ver
32 \let\VERfmt\upm@package@fmt@ver
33 \let\VERdoc\upm@package@doc@ver
34 \let\VERfp\upm@package@fp@ver
35 \let\VERbp\upm@package@bp@ver
36 \let\VERext\upm@package@ext@ver
37 \let\VERtask\upm@package@task@ver
38 \let\VERdocclazz\upm@package@docclazz@ver
39 \let\VERcode\upm@package@code@ver
40 \let\VERspec\upm@package@spec@ver
41 \makeatother
42
43 \setpublisher{Arakhn\^e.org Group}
44 \setcopyrighter{St\'ephane GALLAND}
45 \setprintingaddress{France}
46 \defupmlogo{arakhne_org_logo}
47 \defupmsmalllogo{arakhne_org_logo}
48
49 %\tracingmacros=2
50 %\tracingcommands=1
51
52 \usepackage{multirow}
53
54 \declareupmtheorem{mytheorem}{My Theorem}{List of my Theorems}{thm}{mytheorem}{\textbf}
55
56 \begin{document}
57
58 \tableofcontents
59
60 \listoftables
61
62 \listoffigures
63
64 %###########################################################
65
66 \chapter{Introduction}
67
68 \begin{center}
69 \textcolor{red}{\large This documentation is written for and compiled by the\\version \UPMVERSION\\of tex-upmethodology.}
70 \end{center}
71
72 This set of packages enables users to write documents according to the Unified Process Methodology. It was initially written by St\'ephane \textsc{Galland} from the laboratory ``Syst\`emes et Transports''\savefootnote{Laboratory \emph{Syst\`emes et Transport} (IRTES-SET), Institut de Recherche sur le Transport, l'\'Energie et la Soci\'et\'e (ITRTES), Universit\'e de Technologie de Belfort-Montb{\'e}liard (UTBM), France, \href{http://set.utbm.fr/}{http://set.utbm.fr/}}{foot:setlab} and is distributed by the \arakhneorg website.
73 The provided packages and classes may also be used for other types of documents (reports, theses...). Since 2012, it is used to support the layout and the style for the PhD theses of the Doctoral School SPIM\footnote{Doctoral School on the Sciences for engineers, and microtechnics, \href{http://ed-spim.univ-fcomte.fr/}{http://ed-spim.univ-fcomte.fr/}}.
74
75 Packages are:
76 \begin{itemize}
77 \item \texttt{upmethodology-version.sty}: makes it possible to set the version and the status of the document. It also makes it possible to manage the document history;
78 \item \texttt{upmethodology-fmt.sty}: provides some useful functions to format the UP documents;
79 \item \texttt{upmethodology-document.sty}: provides functions to manage the project, the subproject and the status of the document;
80 \item \texttt{upmethodology-frontpage.sty}: formats and provides a front page for the document;
81 \item \texttt{upmethodology-backpage.sty}: formats and provides a back page for the document;
82 \item \texttt{upmethodology-task.sty}: is the \emph{optional} \LaTeXe\xspace package that provides commands to manage project's tasks.
83 \item \texttt{upmethodology-spec.sty}: is the \emph{optional} \LaTeXe\xspace package that provides commands to build a specification description.
84 \item \texttt{upmethodology-document.cls}: is the \LaTeXe\xspace class that provides the whole document specification. It is based on \texttt{book} and on the previous packages;
85 \item \texttt{upmethodology-code.sty}: provides \emph{optional} commands for source code formatting;
86 \item \texttt{upmethodology-extension.sty}: provides commands for extension mechanism.
87 \end{itemize}
88
89
90 %###########################################################
91 \part{General User Documentation}
92
93 \chapter{Download and Installation}
94
95 This chapter describes where to download \texttt{tex-upmethodology} and how to install it.
96
97 \section{Download}
98
99 \texttt{tex-upmethodology} is available on the \arakhneorg website: \url{http://www.arakhne.org/tex-upmethodology/}.
100
101 Different types of installation are available: manual installation, Debian packages.
102
103 \section{Manual System-wide Installation}
104
105 To make \texttt{tex-upmethodology} available to all users, copy the content of the \texttt{tex-upmethodology} archive inside one of your system texmf directory, usually one of:
106 \begin{itemize}
107 \item \texttt{/usr/share/texmf-texlive/tex/latex/upmethodology},
108 \item \texttt{/usr/share/texmf/tex/latex/upmethodology}.
109 \end{itemize}
110
111 The second is to rebuild the \LaTeX\ databases by invoking on a console (Unix syntax us used): \\
112 \texttt{\$> sudo mktexlsr}\\
113 \texttt{\$> sudo update-updmap --quiet}\\
114
115 \texttt{sudo} is a standard Linux tool that allows authorized users to temporarily obtain the administration rights.
116
117 \section{Manual User-wide Installation}
118
119 To make \texttt{tex-upmethodology} available to one user, copy the content of the \texttt{tex-upmethodology} archive inside the \texttt{\$HOME/texmf} directory.
120
121 It is not required to rebuild the system-wide \LaTeX\ databases because the user's texmf are dynamically parsed by the \LaTeX\ distributions.
122
123 \section{Debian Package Installation}
124
125 Debian packages are available on \arakhneorg website: \url{http://www.arakhne.org/ubuntu.html}. Please follow the given rules.
126
127 \section{Package Dependencies}
128
129 This section contains the list of all the package dependencies for the \texttt{upmethodology} packages.
130
131 \subsection{upmethdology-backpage.sty}
132
133 \texttt{upmethodology-backpage} package depends on:
134 \begin{itemize}
135 \item \texttt{upmethodology-extension}
136 \item \texttt{upmethodology-p-common}
137 \end{itemize}
138
139 \subsection{upmethdology-code.sty}
140
141 \texttt{upmethodology-code} package depends on:
142 \begin{itemize}
143 \item \texttt{upmethodology-p-common}
144 \end{itemize}
145
146 \subsection{upmethdology-document.cls}
147
148 \texttt{upmethodology-document} class depends on:
149 \begin{itemize}
150 \item \texttt{a4wide}
151 \item \texttt{fancyhdr}
152 \item \texttt{hyperref}
153 \item \texttt{upmethodology-backpage}
154 \item \texttt{upmethodology-code} (optional)
155 \item \texttt{upmethodology-document}
156 \item \texttt{upmethodology-extension}
157 \item \texttt{upmethodology-frontpage}
158 \item \texttt{upmethodology-p-common}
159 \item \texttt{upmethodology-spec} (optionnal)
160 \item \texttt{upmethodology-task} (optionnal)
161 \item \texttt{url}
162 \end{itemize}
163
164 \subsection{upmethdology-document.sty}
165
166 \texttt{upmethodology-document} package depends on:
167 \begin{itemize}
168 \item \texttt{babel}
169 \item \texttt{draftwatermark} (only if the document is marked as "draft" or "restricted")
170 \item \texttt{upmethodology-extension}
171 \item \texttt{upmethodology-fmt}
172 \item \texttt{upmethodology-p-common}
173 \item \texttt{upmethodology-version}
174 \item \texttt{vmargin}
175 \end{itemize}
176
177 \subsection{upmethdology-extension.sty}
178
179 \texttt{upmethodology-extension} package depends on:
180 \begin{itemize}
181 \item \texttt{upmethodology-p-common}
182 \end{itemize}
183
184 \subsection{upmethdology-fmt.sty}
185
186 \texttt{upmethodology-fmt} package depends on:
187 \begin{itemize}
188 \item \texttt{bbm}
189 \item \texttt{amsmath}
190 \item \texttt{amsthm}
191 \item \texttt{colortbl}
192 \item \texttt{enumitem}
193 \item \texttt{environ}
194 \item \texttt{fontawesome5}
195 \item \texttt{graphicx}
196 \item \texttt{hyphenat}
197 \item \texttt{longtable}
198 \item \texttt{multicol}
199 \item \texttt{picinpar}
200 \item \texttt{pifont}
201 \item \texttt{relsize}
202 \item \texttt{setspace}
203 \item \texttt{subcaption}
204 \item \texttt{tabularx}
205 \item \texttt{tcolorbox}
206 \item \texttt{thmtools}
207 \item \texttt{tikz}
208 \item \texttt{titlesec}
209 \item \texttt{tocbibind}
210 \item \texttt{txfonts}
211 \item \texttt{upmethodology-p-common}
212 \item \texttt{varioref}
213 \item \texttt{xcolor}
214 \item \texttt{xltabular}
215 \item \texttt{xkeyval}
216 \end{itemize}
217
218 \subsection{upmethdology-frontpage.sty}
219
220 \texttt{upmethodology-frontpage} package depends on:
221 \begin{itemize}
222 \item \texttt{upmethodology-document}
223 \item \texttt{upmethodology-extension}
224 \item \texttt{upmethodology-p-common}
225 \end{itemize}
226
227 \subsection{upmethdology-p-common.sty}
228
229 \texttt{upmethodology-p-common} package depends on:
230 \begin{itemize}
231 \item \texttt{ifpdf}
232 \item \texttt{ifthen}
233 \item \texttt{xcolor}
234 \item \texttt{xspace}
235 \end{itemize}
236
237 \subsection{upmethdology-spec.sty}
238
239 \texttt{upmethodology-spec} package depends on:
240 \begin{itemize}
241 \item \texttt{ulem}
242 \item \texttt{upmethodology-code}
243 \item \texttt{upmethodology-fmt}
244 \item \texttt{upmethodology-p-common}
245 \end{itemize}
246
247 \subsection{upmethdology-task.sty}
248
249 \texttt{upmethodology-task} package depends on:
250 \begin{itemize}
251 \item \texttt{upmethodology-p-common}
252 \item \texttt{upmethodology-version}
253 \end{itemize}
254
255 \subsection{upmethdology-version.sty}
256
257 \texttt{upmethodology-version} package depends on:
258 \begin{itemize}
259 \item \texttt{upmethodology-fmt}
260 \item \texttt{upmethodology-p-common}
261 \end{itemize}
262
263
264 %###########################################################
265 \part{Package Documentation}
266
267 \chapter{Class upmethodology-document}
268
269 \begin{center}
270 \texttt{Version: \VERdocclazz}
271 \end{center}
272
273 The \LaTeX\ class \texttt{upmethodology-document} provides the basic configuration for a document. According to an option, this class is able to extend the standard \texttt{book}, \texttt{report} or \texttt{article} \LaTeX\ classes. It also include several of the other \texttt{upmethdology} packages.
274
275 \section{Types of documents}\label{section:documentclass:doctype}
276
277 \texttt{upmethodology-document} supports three particular options, which permit to set the type of document:
278 \begin{itemize}
279 \item \texttt{book}: A book-specification is a two-sided document composed of parts and chapters, and with a copyright page and document information page. This option indicates to \texttt{upmethodology-document} to load the \LaTeX\ standard \texttt{book} class. In addition the \texttt{{\textbackslash}part} and \texttt{{\textbackslash}chapter} commands are supported, and the following commands are automatically expanded: \texttt{{\textbackslash}makefrontcover}, \texttt{{\textbackslash}upmpublicationpage}, \texttt{{\textbackslash}upmdocumentsummary}, \texttt{{\textbackslash}makebackcover}. This behaviour may be overridden by the other class options.
280
281 \item \texttt{report}: A report-specification is a one-sided document composed of chapters (no part), and with a document information page. This option indicates to \texttt{upmethodology-document} to load the \LaTeX\ standard \texttt{report} class. In addition the \texttt{{\textbackslash}part} command is ignored\savefootnote{The command is redefined to print a warning message when used, no error message is generated.}{ignoretexmacro} and \texttt{{\textbackslash}chapter} command is supported, and the following commands are automatically expanded: \texttt{{\textbackslash}makefrontcover}, \texttt{{\textbackslash}upmdocumentsummary}, \texttt{{\textbackslash}makebackcover}. This behaviour may be overridden by the other class options.
282
283 \item \texttt{article}: An article-specification is a one-sided document composed of sections (no part nor chapter). This option indicates to \texttt{upmethodology-document} to load the \LaTeX\ standard \texttt{article} class. In addition the \texttt{{\textbackslash}part} and \texttt{{\textbackslash}chapter} commands are ignored\reffootnote{ignoretexmacro}, and the following commands are automatically expanded: \texttt{{\textbackslash}makefrontcover}, \texttt{{\textbackslash}makebackcover}. This behaviour may be overridden by the other class options.
284
285 \end{itemize}
286
287 \section{Class options}
288
289 The tables \tabref{documentclassoptions} and \tabref{documentclassoptions2} contain the options supported by \texttt{upmethodology-document}. Any option not explicitely supported by the class is directly passed to the underlying standard \LaTeX\ class (\texttt{book}, \texttt{report} or \texttt{article} according to the type of document, see~\ref{section:documentclass:doctype}).
290
291 \begin{mtable}{\linewidth}{3}{|c|l|X|}{Options (1/2) of \texttt{upmethodology-document} class}{documentclassoptions}
292 \tabularheader{Cat.}{Option}{Explanation}
293 \multirow{3}{*}{Document Type} & article & see section~\ref{section:documentclass:doctype} \\
294 & book & see section~\ref{section:documentclass:doctype}. \\
295 & report & see section~\ref{section:documentclass:doctype} \\
296 \hline
297 \multirow{2}{*}{Page Type} & oneside & the document is generated assuming that each page will be printed on its recto side. This option overrides any previous occurrence of \texttt{twoside} option \\
298 & twoside & the document is generated assuming that each page will be printed on both recto and verso sides. This option overrides any previous occurrence of \texttt{oneside} option \\
299 \hline
300 & english & the document is written in English. \texttt{upmethodology} packages use the English translations for the generated texts. This option overrides any previous occurrence of \texttt{french} option \\
301 \multirow{3}{*}{Language} & francais & same as \texttt{french} \\
302 & french & the document is written in French. \texttt{upmethodology} packages use the French translations for the generated texts. This option overrides any previous occurrence of \texttt{english} option \\
303 \hline
304 \multirow{4}{*}{Informations} & documentinfo & invoke \texttt{{\textbackslash}upmdocumentsummary}, \texttt{{\textbackslash}upmdocumentauthors}, \texttt{{\textbackslash}upmdocumentvalidators}, \texttt{{\textbackslash}upmdocumentinformedpeople}, and \texttt{{\textbackslash}upmhistory} commands at the begining of the document. This option overrides any previous occurrence of \texttt{nodocumentinfo} option \\
305 & nodocumentinfo & do not invoke \texttt{{\textbackslash}upmdocumentsummary}, \texttt{{\textbackslash}upmdocumentauthors}, \texttt{{\textbackslash}upmdocumentvalidators}, \texttt{{\textbackslash}upmdocumentinformedpeople}, nor \texttt{{\textbackslash}upmhistory} commands at the begining of the document. This option overrides any previous occurrence of \texttt{documentinfo} option \\
306 \hline
307 & nopubpage & do not invoke \texttt{{\textbackslash}upmpublicationpage} command at the begining of the document. This option overrides any previous occurrence of \texttt{pubpage} option \\
308 & pubpage & invoke \texttt{{\textbackslash}upmpublicationpage} command at the begining of the document. This option overrides any previous occurrence of \texttt{nopubpage} option \\
309 \end{mtable}
310
311 \begin{mtable}{\linewidth}{3}{|c|l|X|}{Options (2/2) of \texttt{upmethodology-document} class}{documentclassoptions2}
312 \tabularheader{Cat.}{Option}{Explanation}
313 \multirow{9}{*}{Format} & backcover & put the cover page at the end of the document \\
314 & figurecaptionabove & By default, the labels of the figures are below the figures. This option permits to put the figure labels above the figures \\
315 & frontcover & put the cover page at the beginning of the document \\
316 & frontmatter & invoke \texttt{{\textbackslash}frontmatter} (and other related commands) \\
317 & nobackcover & do not put a cover page at the end of the document \\
318 & nofrontcover & do not put a cover page at the beginning of the document \\
319 & nofrontmatter & do not invoke \texttt{{\textbackslash}frontmatter} (and other related commands) \\
320 & standardlist & disable the override of the lists (enumeration, etc.) for restoring the standard \LaTeX\ lists \\
321 & standardlists & The style does not override the standard list, description and enumeration definitions \\
322 & tablecaptionbelow & By default, the labels of the tables are below the tables. This option permits to put the table labels above the tables \\
323 \hline
324 \multirow{3}{*}{Packages} & codepackage & Include the \texttt{upmethodology-code} package \\
325 & specpackage & Include the \texttt{upmethodology-spec} package \\
326 & taskpackage & Include the \texttt{upmethodology-task} package \\
327 \end{mtable}
328
329 \section{Additional Features}
330
331 \texttt{upmethodology-document} provides a constant behaviour for all types of document:
332 \begin{itemize}
333 \item \texttt{hyperref} is loaded and set with the document informations;
334 \item \texttt{{\textbackslash}setpdfcolor} is redefined and linked to \texttt{hyperref};
335 \end{itemize}
336
337 %###########################################################
338
339 \chapter{Package upmethodology-version}
340
341 \begin{center}
342 \texttt{Version: \VERversion}
343 \end{center}
344
345 The package \texttt{upmethodology-version} makes it possible to set the version and the status of the document. It also provides functions to manage the document history;
346
347 \section{Constants for the Document Status}
348
349 Some \LaTeXe\xspace variables provides strings that describe the status of the document. They can be used in functions such as \texttt{{\textbackslash}updateversion}.
350 \begin{itemize}
351 \item \texttt{{\textbackslash}upmrestricted}: the document is under a restricted access, generally corresponding to the list of authors;
352 \item \texttt{{\textbackslash}upmvalidable}: authors indicates with this flag that the document could be sent to validators;
353 \item \texttt{{\textbackslash}upmvalidated}: the document was validated, but not published;
354 \item \texttt{{\textbackslash}upmpublic}: the document published and accessible to all people;
355 \end{itemize}
356
357 \subsection{Information about the Document}
358
359 The following functions permit to access to the informations about the document:
360 \begin{itemize}
361 \item \texttt{{\textbackslash}theupmversion}: replies the last version number for the document;
362
363 \item \texttt{{\textbackslash}upmdate\{version\}}: replies the updating date of the document corresponding to the given version number;
364
365 \item \texttt{{\textbackslash}upmdescription\{version\}}: replies the updating comment of the document corresponding to the given version number;
366
367 \item \texttt{{\textbackslash}upmstatus\{version\}}: replies the status of the document corresponding to the given version number.
368
369 \item \texttt{{\textbackslash}theupmdate}: replies the last updating date for the document. It is equivalent to \texttt{{\textbackslash}upmdate\{{\textbackslash}theupmversion\}};
370
371 \item \texttt{{\textbackslash}theupmlastmodif}: replies the last updating comment for the document. It is equivalent to \texttt{{\textbackslash}upmdescription\{{\textbackslash}theupmversion\}};
372
373 \item \texttt{{\textbackslash}theupmstatus}: replies the last status for the document. It is equivalent to \texttt{{\textbackslash}upmstatus\{{\textbackslash}theupmversion\}};
374 \end{itemize}
375
376 \section{Register Revisions}
377
378 The package \texttt{upmethodology-version} makes it possible to register revisions for building an history. The available functions are:
379 \begin{itemize}
380 \item \texttt{{\textbackslash}updateversion\{version\}\{date\}\{description\}\{status\}}: registers a revision for the document. The revision indicates that the given version was produced at the given date. A small description of the changes and the resulting document's status must be also provided. The function \texttt{{\textbackslash}updateversion} is a generalization of the following functions;
381
382 \item \texttt{{\textbackslash}initialversion[version]\{date\}\{description\}\{status\}}: registers the initial version of the document. If not given, the version is assumed to be \texttt{0.1};
383
384 \item \texttt{{\textbackslash}incversion\{date\}\{description\}\{status\}}: registers a revision corresponding to the next major version. For example, if the version number was \texttt{2.67} before \texttt{{\textbackslash}incversion}, this function add the version \texttt{3.67} with the given informations (incrementation of the major part of the version number);
385
386 \item \texttt{{\textbackslash}incsubversion\{date\}\{description\}\{status\}}: registers a revision corresponding to the next minor version. For example, if the version number was \texttt{2.67} before \texttt{{\textbackslash}incsubversion}, this function add the version \texttt{2.68} with the given informations (incrementation of the minor part of the version number);
387 \end{itemize}
388
389 \section{Formatted List of Versions}
390
391 To obtain a formatted list of versions, you could use the command \texttt{{\textbackslash}upmhistory[width]} which produces:
392
393 \upmhistory
394
395 \section{Localization}
396
397 The following commands defines some localized strings used by \texttt{upmethodology-version}:
398 \begin{itemize}
399 \item \texttt{{\textbackslash}upm@lang@date}: Date;
400 \item \texttt{{\textbackslash}upm@lang@updates}: Updates;
401 \item \texttt{{\textbackslash}upm@lang@version}: Version;
402 \item \texttt{{\textbackslash}upm@lang@version@history}: Version History;
403 \end{itemize}
404
405 %###########################################################
406
407 \chapter{Package upmethodology-fmt}
408
409 \begin{center}
410 \texttt{Version: \VERfmt}
411 \end{center}
412
413 The package \texttt{upmethodology-fmt} provides some useful facilities to format a document.
414
415 \section{Default Configuration for the Package \texttt{graphicx}}
416
417 The package \texttt{graphicx} is included, and the following configuration is applied:
418 \begin{description}
419 \item[Image extensions] By default, the supported image extensions are, in the preference order: \texttt{pdf}, \texttt{png}, \texttt{jpg}, \texttt{jpeg}, \texttt{tiff}, \texttt{gif}. Note that, the \texttt{tiff} picture format is not always supported by the \TeX\ tools.
420
421 To redefine these extensions, you must invoke:\\
422 \texttt{{\textbackslash}DeclareGraphicsExtensions\{extensions\}} \\
423 where \texttt{extensions} must be replaced by a list of extensions separated by comas. \\
424 Example: \texttt{{\textbackslash}DeclareGraphicsExtensions\{.pdf,.png,.eps\}} \\
425 \item[Image search path] By default, the images are search inside the path "\texttt{./}". To redefine the search paths, you must invoke:
426 \texttt{{\textbackslash}graphicspath\{\{path1\},\{path2\},\{path3\}...\}} \\
427 where \texttt{path1}, \texttt{path2}, \texttt{path2}, etc. must be replaced by the names of the directories in which the images are located. The paths in the list are separated by comas. \emph{Do not forget to write a slash or a backslash character (depending on the path naming conventions for your operating system) at the end of each path.} \\
428 Example: \texttt{{\textbackslash}graphicspath\{\{./imgs/\},\{./imgs/auto/\}\}} \\
429 \end{description}
430
431 \section{Contextual Search Path for \texttt{graphicx}}
432
433 As described into the previous section, the \texttt{graphicx} package is able to search for files into a set of defined paths.
434
435 In order to define a search path that is valid for a part of the document, the \texttt{graphicspathcontext} environment is defined. This environment redefines the \texttt{graphicx} path with the environment's parameter. The original value of the \texttt{graphicx} path is restored when existing of the environment.
436
437 \paragraph{Syntax} \mbox{}\\
438 \texttt{{\textbackslash}begin\{graphicspathcontext\}\{path\}} \\
439 \texttt{...}\\
440 \texttt{{\textbackslash}end\{graphicspathcontext\}} \\
441
442
443 The parameter \texttt{path} must follow the syntactic definition of the \texttt{graphicx} path. If you want to reuse the current value of the \texttt{graphicx} path, you could obtain it by using the \texttt{{\textbackslash}old} command.
444
445 \paragraph{Syntax with \texttt{{\textbackslash}old}} \mbox{}\\
446 \texttt{{\textbackslash}begin\{graphicspathcontext\}\{{mypath},{\textbackslash}old\}} \\
447 \texttt{...}\\
448 \texttt{{\textbackslash}end\{graphicspathcontext\}} \\
449
450 \emph{Note that \texttt{{\textbackslash}old} must not be inside curly braces.}
451
452 \section{Extended Caption for Floats with Explanation and Source}
453
454 In \LaTeX, a \emph{float} refers to a specialized environment used to handle content such as figures, tables, and other elements that do not fit seamlessly within the regular flow of text.
455 Floats are designed to "float" to optimal positions in the document, ensuring proper formatting and avoiding awkward breaks in the text.
456
457 Floats also include captions and numbering for easy referencing within the text. By default, captions are placed below figures and above tables, but this can be customized.
458 The captions of the floats also appear in the lists of floats, such as \texttt{{\textbackslash}listoffigures} and \texttt{{\textbackslash}listoftables}.
459
460 One could specify different texts for the captions on the side of the float itself and in these lists. The standard command \texttt{{\textbackslash}caption} takes a mandatory argument that corresponds to the text on the side of the float, and an optional argument that corresponds to the text in the lists.
461
462 \subsection{Explanation and Sources}
463
464 Nevertheless, two types of usefull informations may be attached to a float:
465 \begin{description}
466 \item[Detailed Explanation] it is a text that provides a detailed explanation on the float content. This text is not usefull when it appears in the lists of floats. It is usefull only one the side of the float itself.
467 \item[Source] Some floats refer to other documents: the sources. They corresponds to the original source of a figure or table, or a document that originally explained the content of the float. It is interesting to attach these sources to the floats, but not to see them in the lists of floats.
468 \end{description}
469
470 \subsection{Extended Caption Command}
471
472 To render these two types of information in a different way as the regular float's caption, the package provides the following command, which extends the \LaTeX\ \texttt{{\textbackslash}caption} command, and takes three (3) arguments:
473
474 \texttt{{\textbackslash}upmcaption\{$\langle$caption$\rangle$\}\{$\langle$explanation$\rangle$\}\{$\langle$source$\rangle$\}}
475
476 Where:
477 \begin{itemize}
478 \item \texttt{$\langle$caption$\rangle$} is the text of the regular caption that will appear on the side of the float and in the list of floats;
479 \item \texttt{$\langle$explanation$\rangle$} is the text that provides detailed explanation about the content of the float. This explanation will appear on the side of the float but not in the list of floats;
480 \item \texttt{$\langle$source$\rangle$} is the text that provides sources for the float. These sources will appear on the side of the float but not in the list of floats.
481 \end{itemize}
482
483 \subsection{Example with Explanation Only}
484
485 Let the following \LaTeX\ code for including a figure with an explanation only (no source text):
486
487 \texttt{{\textbackslash}begin\{figure\}} \\
488 \texttt{{\textbackslash}centering} \\
489 \texttt{{\textbackslash}includegraphics\{figure.pdf\}} \\
490 \texttt{{\textbackslash}upmcaption\{Example of figure with explanation\}\{This figure illustrates the rendering of the explanation attached to a figure\}\{\}} \\
491 \texttt{{\textbackslash}end\{figure\}}
492
493 Figure \ref{example:upmcaption1} is the result of this example.
494
495 \begin{figure}
496 \centering
497 \includegraphics{arakhne_org_logo}
498 \upmcaption{Example of figure with explanation}{This figure illustrates the rendering of the explanation attached to a figure}{}
499 \label{example:upmcaption1}
500 \end{figure}
501
502 \subsection{Example with Source Only}
503
504 Let the following \LaTeX\ code for including a figure with a source text only (no explanation):
505
506 \texttt{{\textbackslash}begin\{figure\}} \\
507 \texttt{{\textbackslash}centering} \\
508 \texttt{{\textbackslash}includegraphics\{figure.pdf\}} \\
509 \texttt{{\textbackslash}upmcaption\{Example of figure with source text\}\{\}\{This is the source of the figure\}} \\
510 \texttt{{\textbackslash}end\{figure\}}
511
512 Figure \ref{example:upmcaption2} is the result of this example.
513
514 \begin{figure}
515 \centering
516 \includegraphics{arakhne_org_logo}
517 \upmcaption{Example of figure with source text}{}{This is the source of the figure}
518 \label{example:upmcaption2}
519 \end{figure}
520
521 \subsection{Example with Explanation and Source}
522
523 Let the following \LaTeX\ code for including a figure with an explanation and a source text:
524
525 \texttt{{\textbackslash}begin\{figure\}} \\
526 \texttt{{\textbackslash}centering} \\
527 \texttt{{\textbackslash}includegraphics\{figure.pdf\}} \\
528 \texttt{{\textbackslash}upmcaption\{Example of figure with source text\}\{This figure illustrates the rendering of the explanation and a source text that are attached to a figure\}\{This is the source of the figure\}} \\
529 \texttt{{\textbackslash}end\{figure\}}
530
531 Figure \ref{example:upmcaption3} is the result of this example.
532
533 \begin{figure}
534 \centering
535 \includegraphics{arakhne_org_logo}
536 \upmcaption{Example of figure with source text}{This figure illustrates the rendering of the explanation and a source text that are attached to a figure}{This is the source of the figure}
537 \label{example:upmcaption3}
538 \end{figure}
539
540 \section{Figures}
541
542 It may be verbose to put \LaTeX\ code to include a figure inside your document. To simplify your life, you could include a figure with the following commands.
543
544 \paragraph{Syntax 1} \mbox{}\\
545 \texttt{{\textbackslash}mfigure[position]\{include\_graphics\_options\}\{filename\}\{caption\}\{label\}[source text]}
546
547 \paragraph{Syntax 2} \mbox{}\\
548 \texttt{{\textbackslash}mfigure*[position]\{include\_graphics\_options\}\{filename\}\{caption\}\{label\}[source text]}
549
550 The difference between \texttt{{\textbackslash}mfigure} and \texttt{{\textbackslash}mfigure*} is the same as the difference between \texttt{{\textbackslash}begin\{figure\}} and \texttt{{\textbackslash}begin\{figure*\}}: the star-version fits to the entire paper width event if the document has two or more columns.
551
552 \subsection{Commands for Including Figures}
553
554 These two commands make it possible to include an image in your document. The parameters are:
555 \begin{itemize}
556 \item \texttt{position}: is the desired position of the figure (see {\textbackslash}begin\{figure\}[position]). It could be \texttt{t} (top of the page), \texttt{b} (bottom of the page), \texttt{h} (at the command location if possible) or \texttt{H} (at command location);
557
558 \item \texttt{include\_graphics\_options}: are the options passed to graphic inclusion command.
559 These options may be one of the followings:
560 \begin{itemize}
561 \item \texttt{pgf[=true|false]} : if it is evaluated to true, use the PGF commands \texttt{{\textbackslash}pgfdeclareimage} and \texttt{{\textbackslash}pgfuseimage} for including the image; Otherwise use the command \texttt{{\textbackslash}includegraphics} for including the image;
562 \end{itemize}
563 By default, the command \texttt{{\textbackslash}includegraphics} is used.
564 Depending on the use of the previous options, the rest of the options in \texttt{include\_graphics\_options} are those for \texttt{{\textbackslash}includegraphics} or for \texttt{{\textbackslash}pgfdeclareimage};
565
566 \item \texttt{filename}: is the filename passed to \texttt{{\textbackslash}includegraphics};
567
568 \item \texttt{caption}: is the caption of the figure (see {\textbackslash}caption\{caption\});
569
570 \item \texttt{label}: is the label used to reference the figure (see {\textbackslash}label\{fig:label\}).
571
572 \item \texttt{source text}: is the optinal text used to describe the source of the figure. If this value is provided, it is rendered below the caption itself.
573 \end{itemize}
574
575 \subsection{Commands for Referencing Figures}
576
577 Because the two commands above register a label with string starting with \texttt{fig:}, we propose the following function to easily access to the figure's references:
578 \begin{itemize}
579 \item \texttt{{\textbackslash}figref\{label\}}: is equivalent to \texttt{{\textbackslash}ref\{fig:label\}};
580 \item \texttt{{\textbackslash}figpageref\{label\}}: is equivalent to \texttt{{\textbackslash}pageref\{fig:label\}}.
581 \end{itemize}
582
583 \subsection{Example without Explanation and Source Text}
584
585 The figure~\figref{example:mfigure1} page~\figpageref{example:mfigure1} is obtained with the command:
586
587 \texttt{{\textbackslash}mfigure[ht]\{width=.4{\textbackslash}linewidth\}\{slogo\}\{Example of figure inclusion with {\textbackslash}texttt\{\{{\textbackslash}textbackslash\}mfigure\}\}\{example:mfigure1\}}
588
589 The reference and page reference are obtained with \texttt{{\textbackslash}figref\{example:mfigure1\}} and \texttt{{\textbackslash}figpageref\{example:mfigure1\}}.
590
591 \mfigure[ht]{pgf,width=.4\linewidth}{arakhne_org_logo}{Example of figure inclusion with \texttt{{\textbackslash}mfigure}}{example:mfigure1}
592
593 \subsection{Example with Source Text Only}
594
595 For illustrating the rendering of the source text argument, the figure~\figref{example:mfigure2} page~\figpageref{example:mfigure2} is obtained with the command:
596
597 \texttt{{\textbackslash}mfigure[ht]\{width=.4{\textbackslash}linewidth\}\{slogo\}\{Example of figure inclusion with {\textbackslash}texttt\{\{{\textbackslash}textbackslash\}mfigure with source text\}\}\{example:mfigure2\}[This text explain the source]}
598
599 \mfigure[ht]{pgf,width=.4\linewidth}{arakhne_org_logo}{Example of figure inclusion with \texttt{{\textbackslash}mfigure with source text}}{example:mfigure2}[This text explain the source]
600
601 \subsection{Rendering of the source text}
602
603 The source text that could be provided to the commands \texttt{{\textbackslash}mfigure} or \texttt{{\textbackslash}mfigure*} is rendered with a specific configuration.
604
605 First the color of the source text is defined by \texttt{floatsourceforeground}. The default color is \textcolor{floatsourceforeground}{gray}.
606
607 The prefix text that is written before the provided source text is defined by the command \texttt{{\textbackslash}floatsourcename}.
608
609 It is also possible to change the color and the font of the source text by redefining the command \texttt{{\textbackslash}mfigureformatsource[1]}. This command takes one argument that is the source text provided to \texttt{{\textbackslash}mfigure} or \texttt{{\textbackslash}mfigure*}.
610
611 \section{Sub-figures}
612
613 In some case, it is useful to put several images inside the same floating figure, but without loosing the possibility to reference each of the subfigures. This feature was proposed by the package \texttt{subcaption}. The following environments provides helper functions for \texttt{subcaption}.
614
615 \paragraph{Syntax 1} \mbox{}\\
616 \texttt{{\textbackslash}begin\{mfigures\}[position]\{caption\}\{label\}\\
617 ...\\
618 {\textbackslash}end\{mfigures\}}
619
620 \paragraph{Syntax 2} \mbox{}\\
621 \texttt{{\textbackslash}begin\{mfigures*\}[position]\{caption\}\{label\}\\
622 ...\\
623 {\textbackslash}end\{mfigures*\}}
624
625 These two commands enable you to include an image in your document. The parameters are:
626 \begin{itemize}
627 \item \texttt{position}: is the desired position of the figure (see {\textbackslash}begin\{figure\}[position]). It could be \texttt{t} (top of the page), \texttt{b} (bottom of the page), \texttt{h} (at the command location if possible) or \texttt{H} (at command location);
628
629 \item \texttt{caption}: is the caption of the figure (see {\textbackslash}caption\{caption\});
630
631 \item \texttt{label}: is the label used to reference the figure (see {\textbackslash}label\{fig:label\}).
632 \end{itemize}
633
634 Inside the environment \texttt{{\textbackslash}mfigures[*]}, you could use the command \texttt{{\textbackslash}mfigure} to properly include a subfigure (the first optional parameter is ignored), or you could use the command \texttt{{\textbackslash}msubfigure\{options\}\{file\}\{caption\}}.
635
636 The figure~\figref{example:msubfigure} page~\figpageref{example:msubfigure} is obtained with the environment:\\
637 \texttt{{\textbackslash}begin\{mfigures\}\{Example of subfigures with {\textbackslash}texttt\{msubfigures\}\}\{example:msubfigure\}}\\
638 \texttt{{\textbackslash}mfigure\{width=.4{\textbackslash}linewidth\}\{img1\}\{First subfigure\}\{example:firstsubfigure\}} \\
639 \texttt{{\textbackslash}hspace\{1cm\}} \\
640 \texttt{{\textbackslash}msubfigure\{width=.4{\textbackslash}linewidth\}\{img2\}\{Second subfigure\}} \\
641 \texttt{{\textbackslash}end\{mfigures\}}
642
643 The reference and page reference are obtained with \texttt{{\textbackslash}figref\{example:msubfigure\}} and \texttt{{\textbackslash}figpageref\{example:msubfigure\}}.
644
645 \begin{mfigures}{Example of subfigures with \texttt{mfigures}}{example:msubfigure}
646 \mfigure{pgf,width=.4\linewidth}{arakhne_org_logo}{First subfigure}{example:firstsubfigure}
647 \hspace{1cm}
648 \msubfigure{pgf,width=.4\linewidth}{figure_and_tex}{Second subfigure}
649 \end{mfigures}
650
651 The references to the subfigures could be obtained in two way:\nopagebreak\begin{itemize}
652 \item using the label given as the last parameter of \texttt{{\textbackslash}mfigure}, eg. the label \texttt{example:firstsubfigure} corresponds to \figref{example:firstsubfigure};
653 \item using the label of the enclosing figure to which the index of the subfigure could be appended (in its Roman representation and prefixed by the character ``\texttt{:}''), eg. the label \texttt{example:msubfigure:b} corresponds to \figref{example:msubfigure:b};
654 \end{itemize}
655
656 \subsection{Add a Figures Note}
657
658 A figures note is a note that is rendered below the figures and its caption.
659 This command changes the text of the figures note.
660
661 \paragraph{Syntax} \texttt{{\textbackslash}figurenote\{text\}}
662
663 \begin{mfigures}{Example of subfigures with \texttt{mfigures} and a figures note}{example:msubfigurewithnote}
664 \figurenote{This is the text of the note}
665 \mfigure{pgf,width=.4\linewidth}{arakhne_org_logo}{First subfigure}{example:firstsubfigure}
666 \hspace{1cm}
667 \msubfigure{pgf,width=.4\linewidth}{figure_and_tex}{Second subfigure}
668 \end{mfigures}
669
670
671 \paragraph{Example} The figure \figref{example:msubfigurewithnote} is an illustration of the following \LaTeX\ code: \\
672 \texttt{{\textbackslash}begin\{mfigures\}\{Example of subfigures with {\textbackslash}texttt\{msubfigures\}\}\{example:msubfigure\}}\\
673 \texttt{{\textbackslash}figurenote\{This is the text of the note\}}\\
674 \texttt{{\textbackslash}mfigure\{width=.4{\textbackslash}linewidth\}\{img1\}\{First subfigure\}\{example:firstsubfigure\}} \\
675 \texttt{{\textbackslash}hspace\{1cm\}} \\
676 \texttt{{\textbackslash}msubfigure\{width=.4{\textbackslash}linewidth\}\{img2\}\{Second subfigure\}} \\
677 \texttt{{\textbackslash}end\{mfigures\}}
678
679 \begin{upmcaution}
680 This command has no effect when the class option \texttt{figurecaptionabove} is provided
681 \end{upmcaution}
682
683 \subsubsection{Add a Figures Source}
684
685 A figures source is a text that is describing the source of the content of the figures.
686
687 \paragraph{Syntax} \texttt{{\textbackslash}addsource\{text\}}
688
689 \paragraph{Example} The figure \figref{example:msubfigurewithsource} is an illustration of the following \LaTeX\ code: \\
690 \texttt{{\textbackslash}begin\{mfigures\}\{Example of subfigures with {\textbackslash}texttt\{msubfigures\}\}\{example:msubfigure\}}\\
691 \texttt{{\textbackslash}addsource\{This is the text of the source\}}\\
692 \texttt{{\textbackslash}mfigure\{width=.4{\textbackslash}linewidth\}\{img1\}\{First subfigure\}\{example:firstsubfigure\}} \\
693 \texttt{{\textbackslash}hspace\{1cm\}} \\
694 \texttt{{\textbackslash}msubfigure\{width=.4{\textbackslash}linewidth\}\{img2\}\{Second subfigure\}} \\
695 \texttt{{\textbackslash}end\{mfigures\}}
696
697 \begin{mfigures}{Example of subfigures with \texttt{mfigures} and a figures source}{example:msubfigurewithsource}
698 \addsource{This is the text of the source}
699 \mfigure{pgf,width=.4\linewidth}{arakhne_org_logo}{First subfigure}{example:firstsubfigure}
700 \hspace{1cm}
701 \msubfigure{pgf,width=.4\linewidth}{figure_and_tex}{Second subfigure}
702 \end{mfigures}
703
704 \begin{upmcaution}
705 This command has no effect when the class option \texttt{figurecaptionabove} is provided
706 \end{upmcaution}
707
708 \section{Figures with embedded \TeX\xspace commands}
709
710 In several cases it is useful to include \TeX\xspace commands inside a figure. It is possible to combine figures and \TeX\ commands. Several figure editors provide exporting features to obtain combined figures: \texttt{xfig}, \texttt{inkscape}, \texttt{GNU Plot}, etc. Basically, these tools create two files per source figure: \begin{itemize}
711 \item the figure in PDF or Postscript format (filename extensions, \texttt{.pdf} or \texttt{.ps}); and
712 \item a \TeX\ file that contains the commands to put over the figure, and that is including the generated figure. Its filename extension depends on the type of the figure: \texttt{.pdftex\_t} or \texttt{.pdf\_tex} for PDF, and \texttt{.pstex\_t} or \texttt{.ps\_tex} for Postscript.
713 \end{itemize}
714 To include this combined figure in your document, you simply need to include the generated \TeX\ file (see below for details).
715
716 \subsection{Include a Combined Picture/\TeX\ Figure}
717
718 To include a figure with \TeX\ commands inside, you must have: \begin{enumerate}
719 \item a Postcript figure (\texttt{.eps}), and a \TeX\ file \texttt{.pstex\_t} related to the Postscript figure; or
720 \item a PDF figure (\texttt{.pdf}), and a \TeX\ file \texttt{.pdftex\_t} related to the PDF figure.
721 \end{enumerate}
722
723 With the \texttt{upmethodology-fmt} package, the inclusion of the figure with embedded \TeX\ commands is similar to the inclusion of figures with \texttt{{\textbackslash}includegraphics}. You must type the following command.
724
725 \paragraph{Syntax} \texttt{{\textbackslash}includegraphicswtex[options]\{filename\}}
726
727 where \texttt{options} must be one or more of: \begin{itemize}
728 \item \texttt{width=xxx}: specification of the width of the figure (\texttt{xxx} must be replaced by the length);
729 \item \texttt{height=xxx}: specification of the height of the figure (\texttt{xxx} must be replaced by the length);
730 \end{itemize}
731
732 If the \texttt{filename} given to the command \texttt{{\textbackslash}includegraphicswtex} does not specify a filename extension, the command tries to add the extensions \texttt{.pdftex\_t}, \texttt{.pstex\_t}, \texttt{.pdf\_tex}, or \texttt{.ps\_tex}, by default. If you want to specify other file extensions, you must use the command.
733
734 \paragraph{Syntax} \texttt{{\textbackslash}DeclareGraphicsExtensionsWtex\{extensions\}} \\
735 where the \texttt{extensions} is a list of file extensions (including the point character), separated by coma characters.
736
737 \paragraph{Example} \texttt{{\textbackslash}DeclareGraphicsExtensionsWtex\{.pdftex,.pstex\}}
738
739 If the \texttt{filename} does not correspond to a file on the disk, the command \texttt{{\textbackslash}includegraphicswtex} tries to find the file in the directories specified in \texttt{{\textbackslash}graphicspath} (declared in the package \texttt{graphicx} for example). \\
740
741 \paragraph{Example} \texttt{{\textbackslash}graphicspath\{\{./imgs/\},\{./imgs/additional/\}\}} \\
742
743 \begin{upminfo}
744 Note that each of the given directories must be finished by the separation character of your operating system: \texttt{/} on Unix, \texttt{\textbackslash} on Windows. You must always use the Unix standard because it is assumed by a lot of \TeX\ compilers, even on Windows platforms.
745 \end{upminfo}
746
747 Figure~\figref{figure_and_tex} gives an example of a floating figure combined with \TeX\ commands, which is using the command \texttt{{\textbackslash}includegraphicswtex}.
748
749 \subsection{Floating figure with embedded \TeX\ commands}
750
751 To put a floating figure with \TeX\xspace command inside, you may use one of the commands.
752
753 \paragraph{Syntax 1} \texttt{{\textbackslash}mfigurewtex[position]\{include\_graphics\_options\}\{filename\}\{caption\}\{label\}}
754
755 \paragraph{Syntax 2} \texttt{{\textbackslash}mfigurewtex*[position]\{include\_graphics\_options\}\{filename\}\{caption\}\{label\}}
756
757 The parameters are:
758 \begin{itemize}
759 \item \texttt{position}: is the desired position of the figure (see {\textbackslash}begin{figure}[position]). It could be \texttt{t} (top of the page), \texttt{b} (bottom of the page), \texttt{h} (at the command location if possible) or \texttt{H} (at command location);
760
761 \item \texttt{include\_graphics\_options}: are the options to pass to \texttt{{\textbackslash}includegraphicswtex}. For ascendant compatibility, if you pass a length without a key, e.g. \texttt{\{.8{\textbackslash}linewidth\}}, the length is assumed to be the width of the figure;
762
763 \item \texttt{filename}: is the name of the file of the figure (see \texttt{{\textbackslash}includegraphicswtex} for details);
764
765 \item \texttt{caption}: is the caption of the figure (see {\textbackslash}caption\{caption\});
766
767 \item \texttt{label}: is the label used to reference the figure (see {\textbackslash}label\{fig:label\}).
768 \end{itemize}
769
770 The difference between \texttt{{\textbackslash}mfigurewtex} and \texttt{{\textbackslash}mfigurewtex*} is the same as the difference between \texttt{{\textbackslash}begin\{figure\}} and \texttt{{\textbackslash}begin\{figure*\}}: the star-version fits to the entire paper width event if the document has two or more columns.
771
772 Because the two commands above register a label with string starting with \texttt{fig:}, the commands \texttt{{\textbackslash}figref} and \texttt{{\textbackslash}figpageref} could be used.
773
774 \figmath{exampleofexpression}{t_i = \sum_i \left(\alpha + \beta\right)}
775 \mfigurewtex{.8\linewidth}{figure_and_tex}{Example of a figure combined with \TeX\ commands}{figure_and_tex}
776
777 Figure~\figref{figure_and_tex} gives an example of a floating figure combined with \TeX\ commands. Note that:
778 \begin{itemize}
779 \item the title of the figure contains the command \texttt{{\textbackslash}LaTeX}, which produces: \LaTeX;
780 \item a small equation, written in \TeX, is put between the two planes;
781 \end{itemize}
782
783 \subsection{Helpers for embedded \TeX}
784
785 To help you to put \TeX\ commands in a figure, and to define its real test inside the \LaTeX\ document, several functions are provided:
786 \begin{itemize}
787 \item \texttt{{\textbackslash}figmath\{id\}\{expr\}} will associate to the given identifier the given mathematical expression,
788 \item \texttt{{\textbackslash}figtext\{id\}\{expr\}} will associate to the given identifier the given text expression;
789 \end{itemize}
790
791 These expressions, defined with the two previous functions, may be referenced in the figure by a \TeX\ command with a name similar to \texttt{{\textbackslash}FIG$\delta$}, where $\delta$ must be replaced by an identifier of your choice and used as parameter of one of the two previous functions (example: \texttt{{\textbackslash}FIGmyid}).
792
793 Figure~\figref{figure_and_tex} gives an example where the equation is written as: \texttt{{\textbackslash}FIGexampleofexpression} in the figure, and it is replaced by the real equation with: \\
794 \texttt{{\textbackslash}figmath\{exampleofexpression\}\{t\_i = {\textbackslash}sum\_i {\textbackslash}left({\textbackslash}alpha + {\textbackslash}beta{\textbackslash}right)\}}
795
796
797
798 \section{Tabulars}
799 \label{section:mtabular}
800
801 You could include a tabular (nor not-floating table) inside your document with the following environment.
802 The UPmethodology provides two types of tabular environments: regular tabular, long tabular and table.
803 Table \tabref{tabulartablecomparison} provides a brief comparison of these three concepts, that are detailed in sections \ref{section:regulartabular}, \ref{section:longtabular} and \ref{section:mtable}, respectivelly.
804
805 \begin{mtable}{\linewidth}{4}{l|X|X|X}{Comparison of the concepts of regular tabular, long tabular and table}{tabulartablecomparison}
806 \tabularheader{Criterion}{Regular Tabular}{Long Tabular}{Table}
807 Purpose & Creating the structure of a table & Same as regular tabular & Used as a floating container for tabular material \\
808 \hline
809 Floating Behavior & No & No & Yes \\
810 \hline
811 Placement Control & Where the tabular is written & Where the tabular is written & \LaTeX\ decides according to provided position modifiers \\
812 \hline
813 Multiple pages & No & Yes & No \\
814 \hline
815 \end{mtable}
816
817 \subsection{Regular Tabular}
818 \label{section:regulartabular}
819
820 The regular tabular is designed to create tables by organizing data into rows and columns.
821 According to Table \tabref{tabulartablecomparison}, a regular tabular cannot cover multiple pages.
822
823 \paragraph{Syntax} \texttt{{\textbackslash}begin\{mtabular\}[width]\{ncolumns\}\{columns\}\{top title\}...{\textbackslash}end\{mtabular\}}
824
825 This tabular is an extension of the \texttt{xltabular} environment which provides dynamic columns with the specifier \texttt{X}, mixing the \texttt{lontable} and \texttt{tabularx} standard packages. The parameters are:
826 \begin{itemize}
827 \item \texttt{width}: is the desired width of the tabular;
828
829 \item \texttt{ncolumns}: is the count of columns in the tabular. It must be consistent with the column description;
830
831 \item \texttt{columns}: is the description of the columns according to the \texttt{tabular} and \texttt{tabularx} or \texttt{xltabular} packages. The following characters are supported for representing a single column :
832 \begin{itemize}
833 \item \texttt{l}: the column is left aligned with a width that is corresponding to the maximum width of the column's content;
834 \item \texttt{r}: the column is right aligned with a width that is corresponding to the maximum width of the column's content;
835 \item \texttt{c}: the column is centered with a width that is corresponding to the maximum width of the column's content;
836 \item \texttt{p\{w\}}: the column is centered with a width equals to \texttt{w};
837 \item \texttt{X}: the column is centered with a width computed by \LaTeX.
838 \end{itemize}
839
840 \item \texttt{top title}: is the text to be drawn as a title at the top of the table. This top title is not a caption, according to the definition of a caption in a table.
841
842 \end{itemize}
843
844 \begin{upmcaution}
845 The number of columns must be the same for \texttt{ncolumns} and \texttt{columns}.
846 \end{upmcaution}
847
848 \begin{upmnote}
849 It is recommended to use as least one \texttt{X} in the specification of the \texttt{columns}.
850 \end{upmnote}
851
852
853 The \texttt{mtabular} environment provides:
854 \begin{itemize}
855 \item \texttt{{\textbackslash}tabulartitleinside\{title\}} \\
856 This command allows you to define the title of the tabular. It uses the colors \texttt{tableheaderbackground} and \texttt{tableheaderforeground} for the background and the foreground respectively. The title has two lines at the top, and a single line below;
857
858 \item \texttt{{\textbackslash}tabularheader\{$header_1$\}...\{$header_n$\}} \\
859 This command allows you to define the titles of the columns. It uses the colors \texttt{tableheaderbackground} and \texttt{tableheaderforeground} for the background and the foreground respectively. Because the count of columns was given to the environment this function takes the same count of parameters as the count of columns. This command adds a line after the header, \emph{BUT NOT BEFORE}.
860
861 \begin{upmnote}
862 The header text $header_1$ to $header_n$ ould have multiple lines. It is allowed to use the command \texttt{{\textbackslash}{\textbackslash}} to add a line in the column's title.
863 \end{upmnote}
864
865 \item \texttt{{\textbackslash}tabularrowheader\{title\}} \\
866 This command is designed to be used in the first cell of a row. It is rendering the cell as a row's header. A row header is a cell that is an header for the row. Only the row header cell has the header background color.
867
868 \item \texttt{{\textbackslash}tabulartitlespec\{column\_spec\}} \\
869 This command defines the specification of the column used to render the title of the table.
870 The default value of the column specification is $|$\texttt{c}$|$.
871
872 \end{itemize}
873
874 \begin{upmcaution}
875 The following command is deprecated: \texttt{{\textbackslash}tabulartitle}.
876 \end{upmcaution}
877
878 The following example of table is obtained by: \\
879 \begin{verbatim}
880 \begin{mtabular}[\linewidth]{4}{lXrX}{}
881 \tabularheader{Col1}{Col2}{Col3}{Col4}
882 a & b & c & d \\
883 \hline
884 e & f & g & h \\
885 \tabulartitleinside{Example of second title in the table}
886 \hline
887 \tabularrowheader{i} & j & k & l \\
888 \tabularheader{Col1-2}{Col2-2}{Col3-2}{Col4-2}
889 m & n & o & p \\
890 \end{mtabular}
891 \end{verbatim}
892
893 \begin{mtabular}[\linewidth]{4}{lXrX}{}
894 \tabularheader{Col1}{Col2}{Col3}{Col4}
895 a & b & c & d \\
896 \hline
897 e & f & g & h \\
898 \tabulartitleinside{Example of second title in the table}
899 \hline
900 \tabularrowheader{i} & j & k & l \\
901 \tabularheader{Col1-2}{Col2-2}{Col3-2}{Col4-2}
902 m & n & o & p \\
903 \end{mtabular}
904
905 \subsection{Long Tabular}
906 \label{section:longtabular}
907
908 Long tables could be rendered on multiple pages, according to Table \tabref{tabulartablecomparison}, page \tabpageref{tabulartablecomparison}.
909 The \texttt{mlongtabular} environment supports long tables.
910
911 \paragraph{Syntax} \texttt{{\textbackslash}begin\{mlongtabular\}[width]\{ncolumns\}\{columns\}\{top title\}...{\textbackslash}end\{mlongtabular\}}
912
913 \paragraph{Example} An example of a long table could be found below.
914
915 \begin{mlongtabular}[\linewidth]{2}{|l|X|}{This is the long table title}
916 \tabularheader{Col1}{Col2}
917 1 & 0 \\
918 2 & 0 \\
919 3 & 0 \\
920 4 & 0 \\
921 5 & 0 \\
922 6 & 0 \\
923 7 & 0 \\
924 8 & 0 \\
925 9 & 0 \\
926 10 & 1 \\
927 11 & 1 \\
928 12 & 1 \\
929 13 & 1 \\
930 14 & 1 \\
931 15 & 1 \\
932 16 & 1 \\
933 17 & 1 \\
934 18 & 1 \\
935 20 & 2 \\
936 21 & 2 \\
937 22 & 2 \\
938 23 & 2 \\
939 24 & 2 \\
940 25 & 2 \\
941 26 & 2 \\
942 27 & 2 \\
943 28 & 2 \\
944 29 & 2 \\
945 30 & 3 \\
946 31 & 3 \\
947 32 & 3 \\
948 33 & 3 \\
949 34 & 3 \\
950 35 & 3 \\
951 36 & 3 \\
952 37 & 3 \\
953 38 & 3 \\
954 39 & 3 \\
955 40 & 4 \\
956 41 & 4 \\
957 42 & 4 \\
958 43 & 4 \\
959 44 & 4 \\
960 45 & 4 \\
961 46 & 4 \\
962 47 & 4 \\
963 48 & 4 \\
964 49 & 4 \\
965 50 & 5 \\
966 51 & 5 \\
967 52 & 5 \\
968 53 & 5 \\
969 54 & 5 \\
970 55 & 5 \\
971 56 & 5 \\
972 57 & 5 \\
973 58 & 5 \\
974 59 & 5 \\
975 60 & 6 \\
976 61 & 6 \\
977 62 & 6 \\
978 63 & 6 \\
979 64 & 6 \\
980 65 & 6 \\
981 66 & 6 \\
982 67 & 6 \\
983 68 & 6 \\
984 68 & 6 \\
985 \end{mlongtabular}
986
987 \section{Tables}
988 \label{section:mtable}
989
990 You could include a table inside your document with the following environment: \\
991 \texttt{{\textbackslash}begin\{mtable\}[options]\{width\}\{ncolumns\}\{columns\}\{caption\}\{label\}...{\textbackslash}end\{mtable\}} \\
992
993 According to Table \tabref{tabulartablecomparison}, page \tabpageref{tabulartablecomparison}, a table is a floating structure that contains data formatted in rows and columns.
994
995 This environment is based on the \texttt{mtabular} environment (see Section \ref{section:mtabular}). The parameters are:
996 \begin{itemize}
997 \item \texttt{options}: are the options to pass to the \texttt{mtable} environment: \begin{itemize}
998 \item a table placement composed of one or more of the following characters. The order in which the placement options are specified does not make any difference, as the placement options are always attempted in the order \texttt{h-t-b-p}. Thus \texttt{[hb]} and \texttt{[bh] }are both attempted as \texttt{h-b}. The more float placement options are given to \LaTeX, the better it handles float placement. Consequently, and because we want a simple \TeX\ code in the background, all the permutations are not supported by the \texttt{mtable} environment. We recommend to put placement letters in the order they appear in the following list: \begin{itemize}
999
1000 \item \texttt{h}: Place the float here, i.e., approximately at the same point it occurs in the source text (however, not exactly at the spot),
1001 \item \texttt{t}: Position at the top of the page,
1002 \item \texttt{b}: Position at the bottom of the page,
1003 \item \texttt{p}: Put on a special page for floats only,
1004 \item \texttt{H}: Places the float at precisely the location in the \LaTeX\ code. Requires the \texttt{float} package. This is somewhat equivalent to \texttt{h!};
1005 \item \texttt{!}: Override internal parameters \LaTeX\ uses for determining ``good'' float positions,
1006 \end{itemize}
1007 If you specify more than one table placement in the options, the last one is used.
1008 \item \texttt{size=\string<command\string>}: specify the size of the text in the table (by default, \texttt{{\textbackslash}normalsize});
1009 \end{itemize}
1010 \item \texttt{width}: is the desired width of the table (ie., the tabular inside the table);
1011 \item \texttt{ncolumns}: is the count of columns in the table (ie., the tabular inside the table). It must be consistent with the column description;
1012 \item \texttt{columns}: is the description of the columns according to the \texttt{tabular} and \texttt{tabularx} and \texttt{xltabular} packages;
1013 \item \texttt{caption}: is the caption of the table;
1014 \item \texttt{label}: is the label referencing the table.
1015 \end{itemize}
1016
1017 \begin{upmcaution}
1018 The number of columns must be the same for \texttt{ncolumns} and \texttt{columns}.
1019 \end{upmcaution}
1020
1021 \begin{upmnote}
1022 It is recommended to use as least one \texttt{X} in the specification of the \texttt{columns}.
1023 \end{upmnote}
1024
1025 Because the \texttt{mtable} environment registers a label with a string starting with \texttt{tab:}, the following functions are proposed to easily access to the table's references:
1026 \begin{itemize}
1027 \item \texttt{{\textbackslash}tabref\{label\}}: is equivalent to \texttt{{\textbackslash}ref\{tab:label\}};
1028 \item \texttt{{\textbackslash}tabpageref\{label\}}: is equivalent to \texttt{{\textbackslash}pageref\{tab:label\}}.
1029 \end{itemize}
1030
1031 The table~\tabref{example:mtable} page~\tabpageref{example:mtable} is an illustration of the following \LaTeX\ code: \\
1032 \texttt{{\textbackslash}begin\{mtable\}\{{\textbackslash}linewidth\}\{4\}\{lXrX\}\{Example of {\textbackslash}texttt{mtable}\}\{example:mtable\}} \\
1033 \texttt{{\textbackslash}tabularheader\{Col1\}\{Col2\}\{Col3\}\{Col4\}} \\
1034 \texttt{a \& b \& c \& d {\textbackslash}{\textbackslash}} \\
1035 \texttt{{\textbackslash}hline} \\
1036 \texttt{e \& f \& g \& h {\textbackslash}{\textbackslash}} \\
1037 \texttt{{\textbackslash}end\{mtable\}}
1038
1039 \begin{mtable}{\linewidth}{4}{lXrX}{Example of \texttt{mtable}}{example:mtable}
1040 \tabularheader{Col1}{Col2}{Col3}{Col4}
1041 a & b & c & d \\
1042 \hline
1043 e & f & g & h \\
1044 \end{mtable}
1045
1046 \subsection{Table Components}
1047
1048 The package provides several commands that could help you to configure, update or add a component ot the table.
1049
1050 \subsubsection{Add a Table Note}
1051
1052 A table note is a note that is rendered below the table and its caption.
1053 This command changes the text of the table note.
1054
1055 \paragraph{Syntax} \texttt{{\textbackslash}tablenote\{text\}}
1056
1057 \begin{mtable}{\linewidth}{4}{lXrX}{Example of \texttt{mtable} with a table note}{example:mtable2}
1058 \tablenote{This is the text of the note}
1059 \tabularheader{Col1}{Col2}{Col3}{Col4}
1060 a & b & c & d \\
1061 \hline
1062 e & f & g & h \\
1063 \end{mtable}
1064
1065 \paragraph{Example} The table~\tabref{example:mtable2} is an illustration of the following \LaTeX\ code: \\
1066 \texttt{{\textbackslash}begin\{mtable\}\{{\textbackslash}linewidth\}\{4\}\{lXrX\}\{Example of {\textbackslash}texttt{mtable} with a table note\}\{example:mtable2\}} \\
1067 \texttt{{\textbackslash}tablenote\{This is the text of the note\}} \\
1068 \texttt{{\textbackslash}tabularheader\{Col1\}\{Col2\}\{Col3\}\{Col4\}} \\
1069 \texttt{a \& b \& c \& d {\textbackslash}{\textbackslash}} \\
1070 \texttt{{\textbackslash}hline} \\
1071 \texttt{e \& f \& g \& h {\textbackslash}{\textbackslash}} \\
1072 \texttt{{\textbackslash}end\{mtable\}}
1073
1074 \begin{upmcaution}
1075 This command has no effect when the class option \texttt{tablecaptionabove} is provided
1076 \end{upmcaution}
1077
1078 \subsubsection{Add a Table Source}
1079
1080 A table source is a text that is describing the source of the content of the table.
1081
1082 \paragraph{Syntax} \texttt{{\textbackslash}addsource\{text\}}
1083
1084 \paragraph{Example} The table~\tabref{example:mtable3} is an illustration of the following \LaTeX\ code: \\
1085 \texttt{{\textbackslash}begin\{mtable\}\{{\textbackslash}linewidth\}\{4\}\{lXrX\}\{Example of {\textbackslash}texttt{mtable} with a table source\}\{example:mtable3\}} \\
1086 \texttt{{\textbackslash}addsource\{This is the source of the content\}} \\
1087 \texttt{{\textbackslash}tabularheader\{Col1\}\{Col2\}\{Col3\}\{Col4\}} \\
1088 \texttt{a \& b \& c \& d {\textbackslash}{\textbackslash}} \\
1089 \texttt{{\textbackslash}hline} \\
1090 \texttt{e \& f \& g \& h {\textbackslash}{\textbackslash}} \\
1091 \texttt{{\textbackslash}end\{mtable\}}
1092
1093 \begin{mtable}{\linewidth}{4}{lXrX}{Example of \texttt{mtable} with a table source}{example:mtable3}
1094 \addsource{This is the source of the content}
1095 \tabularheader{Col1}{Col2}{Col3}{Col4}
1096 a & b & c & d \\
1097 \hline
1098 e & f & g & h \\
1099 \end{mtable}
1100
1101 \begin{upmcaution}
1102 This command has no effect when the class option \texttt{tablecaptionabove} is provided
1103 \end{upmcaution}
1104
1105 \section{Enumerations}
1106
1107 The package \texttt{upmethodology-fmt} provides a set of commands dedicated to enumeration lists.
1108
1109 \subsection{Enumeration Counters}
1110
1111 Sometimes it is useful to start an enumeration list from a specific given number. This package provides several commands for saving and restoring the counter use by the enumeration lists.
1112
1113 \begin{upmcaution}
1114 Only one counter could be saved at a given time.
1115 It means that you cannot save the counters for an enumeration and for an enclosing enumeration at the same time.
1116 \end{upmcaution}
1117
1118 Two general commands are defined for helping you to save a counter value into the global variable:
1119 \begin{itemize}
1120 \item \texttt{{\textbackslash}savecounter\{name\}} \\
1121 save the value of the counter identified by the given name in a global variable.
1122 The name of the counter must be previously defined with one of the standard \LaTeX\ or \TeX\ commands, e.g. \texttt{{\textbackslash}newcounter};
1123 \item \texttt{{\textbackslash}restorecounter\{name\}} \\
1124 put the previously saved value into the counter with the given name.
1125 The name of the counter must be previously defined with one of the standard \LaTeX\ or \TeX\ commands, e.g. \texttt{{\textbackslash}newcounter};
1126 \end{itemize}
1127
1128 The counter is extensively used in enumeration lists. The following commands will help you for managing the enumeration counter:
1129 \begin{itemize}
1130 \item \texttt{{\textbackslash}setenumcounter\{value\}} \\
1131 force the value of the counter used by the enumeration environments;
1132 \item \texttt{{\textbackslash}getenumcounter} \\
1133 replies the value of the counter used by the enumeration environments;
1134 \item \texttt{{\textbackslash}saveenumcounter} \\
1135 save the value of the counter used by the enumeration environment with \texttt{{\textbackslash}savecounter};
1136 \item \texttt{{\textbackslash}restoreenumcounter} \\
1137 restore the value of the counter used by the enumeration environment with \texttt{{\textbackslash}restorecounter}.
1138 \end{itemize}
1139
1140 \paragraph{Example:} The following \LaTeX~code produces the result below:
1141 \begin{verbatim}
1142 This is a text: \begin{enumerate}
1143 \item This is an item.
1144 \item This is another item.
1145 \saveenumcounter
1146 \end{enumerate}
1147 This is a text in the between.
1148 \begin{enumerate}
1149 \restoreenumcounter
1150 \item The list goes on
1151 \item and on.
1152 \end{enumerate}
1153 This is a second text in the between.
1154 \begin{enumerate}
1155 \setenumcounter{18}
1156 \item The list goes on again
1157 \item and on.
1158 \end{enumerate} This is the text after.
1159 \end{verbatim}
1160
1161 \fbox{\parbox{\linewidth}{
1162 This is a text: \begin{enumerate}
1163 \item This is an item.
1164 \item This is another item.
1165 \saveenumcounter
1166 \end{enumerate}
1167 This is a text in the between.
1168 \begin{enumerate}
1169 \restoreenumcounter
1170 \item The list goes on
1171 \item and on.
1172 \end{enumerate}
1173 This is a second text in the between.
1174 \begin{enumerate}
1175 \setenumcounter{18}
1176 \item The list goes on again
1177 \item and on.
1178 \end{enumerate} This is the text after.
1179 }}
1180
1181 \subsection{Inline Enumeration}
1182
1183 In several document, an enumeration of things is written inside a paragraph instead of inside a list of points.
1184
1185 \subsubsection{Standard inline enumeration from \texttt{enumitem}}
1186
1187 The UPmethodology package includes the package \texttt{enumitem} with the \texttt{inline} option.
1188 Therefore, it is possible to obtain an inline (or horizontal) enumeration.
1189
1190 \paragraph{Example:} The following \LaTeX~code produces the result below:
1191 \begin{verbatim}
1192 This is a text: \begin{enumerate*}
1193 \item first thing;
1194 \item second thing;
1195 \item etc.
1196 \end{enumerate*} This is the text after.
1197 \end{verbatim}
1198
1199 This is a text: \begin{enumerate*}
1200 \item first thing;
1201 \item second thing;
1202 \item etc.
1203 \end{enumerate*} This is the text after.
1204
1205 \subsubsection{Shortcut inline enumeration}
1206
1207 The environment \texttt{inlineenumeration} is a shortcut to \texttt{enumerate*} with the options \texttt{label={\textbackslash}textit{({\textbackslash}roman*)},ref={\textbackslash}textit{({\textbackslash}roman*)}}.
1208
1209 \paragraph{Example:} The following \LaTeX~code produces the result below:
1210 \begin{verbatim}
1211 This is a text: \begin{inlineenumeration}
1212 \item first thing;
1213 \item second thing;
1214 \item etc.
1215 \end{inlineenumeration} This is the text after.
1216 \end{verbatim}
1217
1218 This is a text: \begin{inlineenumeration}
1219 \item first thing;
1220 \item second thing;
1221 \item etc.
1222 \end{inlineenumeration} This is the text after.
1223
1224
1225 \section{Environment \texttt{description}}
1226
1227 The environment \texttt{description} is redefined as following.
1228
1229 \paragraph{Syntax}
1230 \begin{verbatim}
1231 \begin{description}[separator]
1232 \item[desc] text
1233 \end{description}
1234 \end{verbatim}
1235 The text put in place of \texttt{desc} represents the text which may be emphasized in the description item.
1236 The \texttt{separator} is the text that is inserted at the end of the head of each description item.
1237
1238
1239 \paragraph{Example 1} The following \LaTeX~code, using Roman numbers, produces the description just below:
1240 \begin{verbatim}
1241 \begin{description}
1242 \item[first thing] this is a text for the first thing;
1243 \item[second thing] this is a text for the second thing;
1244 \item[more] etc.
1245 \end{description}
1246 \end{verbatim}
1247
1248 \begin{description}
1249 \item[first thing] this is a text for the first thing;
1250 \item[second thing] this is a text for the second thing;
1251 \item[more] etc.
1252 \end{description}
1253
1254 \paragraph{Example 2} The following \LaTeX~code produces the description just below:
1255 \begin{verbatim}
1256 \begin{description}[///]
1257 \item[first thing] this is a text for the first thing;
1258 \item[second thing] this is a text for the second thing;
1259 \item[more] etc.
1260 \end{description}
1261 \end{verbatim}
1262
1263 \begin{description}[///]
1264 \item[first thing] this is a text for the first thing;
1265 \item[second thing] this is a text for the second thing;
1266 \item[more] etc.
1267 \end{description}
1268
1269 \section{Descriptions in conjunction with enumeration}
1270
1271 It may be helpful to put a list of descriptions in conjunction with an enumeration.
1272 In other words, the following environment provides a mix between the standards \LaTeX~environments \texttt{description} and \texttt{enumerate}.
1273
1274 \subsection{Environment \texttt{enumdescription}}
1275
1276 The environment \texttt{enumdescription} is:
1277
1278 \paragraph{Syntax}
1279 \begin{verbatim}
1280 \begin{enumdescription}[type]
1281 \item[desc] text
1282 \end{enumdescription}
1283 \end{verbatim}
1284 where the \texttt{type} is the type of the enumeration. It may be one of:
1285 \begin{itemize}
1286 \item ``\texttt{i}'': for an enumeration with Roman numbers (this is the default),
1287 \item ``\texttt{1}'': for an enumeration with Arabic numbers,
1288 \item ``\texttt{a}'': for an enumeration with letters.
1289 \end{itemize}
1290 The text put in place of \texttt{desc} represents the text which may be emphasized in the description item.
1291
1292
1293 To change the rendering of the labels, you must redefined the command as:
1294 \begin{verbatim}
1295 \renewcommand{\enumdescriptionlabel}[1]{ ... #1 ... }
1296 \end{verbatim}
1297
1298 To change the separator between the counter and the description, you must redefined the command as:
1299 \begin{verbatim}
1300 \renewcommand{\enumdescriptioncounterseparator}{ ... }
1301 \end{verbatim}
1302
1303 To change the separator between the description and the rest of the text, you must redefined the command as:
1304 \begin{verbatim}
1305 \renewcommand{\enumdescriptionlabelseparator}{ ... }
1306 \end{verbatim}
1307
1308 \paragraph{Example 1} The following \LaTeX~code, using Roman numbers, produces the enumerated description just below:
1309 \begin{verbatim}
1310 \begin{enumdescription}
1311 \item[first thing] this is a text for the first thing;
1312 \item[second thing] this is a text for the second thing;
1313 \item[more] etc.
1314 \end{enumdescription}
1315 \end{verbatim}
1316
1317 \begin{enumdescription}
1318 \item[first thing] this is a text for the first thing;
1319 \item[second thing] this is a text for the second thing;
1320 \item[more] etc.
1321 \end{enumdescription}
1322
1323 \paragraph{Example 2} The following \LaTeX~code, using numeric numbers, produces the enumerated description just below:
1324 \begin{verbatim}
1325 \begin{enumdescription}[1]
1326 \item[first thing] this is a text for the first thing;
1327 \item[second thing] this is a text for the second thing;
1328 \item[more] etc.
1329 \end{enumdescription}
1330 \end{verbatim}
1331
1332 \begin{enumdescription}[1]
1333 \item[first thing] this is a text for the first thing;
1334 \item[second thing] this is a text for the second thing;
1335 \item[more] etc.
1336 \end{enumdescription}
1337
1338 \paragraph{Example 3} The following \LaTeX~code, using letter numbers, produces the enumerated description just below:
1339 \begin{verbatim}
1340 \begin{enumdescription}[a]
1341 \item[first thing] this is a text for the first thing;
1342 \item[second thing] this is a text for the second thing;
1343 \item[more] etc.
1344 \end{enumdescription}
1345 \end{verbatim}
1346
1347 \begin{enumdescription}[a]
1348 \item[first thing] this is a text for the first thing;
1349 \item[second thing] this is a text for the second thing;
1350 \item[more] etc.
1351 \end{enumdescription}
1352
1353 \subsection{Environment \texttt{enumerate}}
1354
1355 The environment \texttt{enumerate} exists in the standard \LaTeX\ distributions.
1356 The UPM package redefines this environment to provide a behavior similar to the one of the environment \texttt{enumdescription}.
1357
1358 Additionally, you could specify the format of the counter in the first optional parameter. This format is a text in which the first occurrence of one of the following characters is replaced by the value of the counter with the associated number format:
1359 \begin{itemize}
1360 \item \texttt{1}: the counter is an arabic number;
1361 \item \texttt{a}: the counter is a sequence of lower-case alphabetic letters;
1362 \item \texttt{A}: the counter is a sequence of upper-case alphabetic letters;
1363 \item \texttt{i}: the counter is a lower-case roman number;
1364 \item \texttt{I}: the counter is an upper-case roman number.
1365 \end{itemize}
1366
1367 \paragraph{Example 1} The following \LaTeX~code produces a list, which is similar to the one generated by the standard \LaTeX\ environment \texttt{enumerate}:
1368 \begin{verbatim}
1369 \begin{enumerate}
1370 \item this is a text for the first thing;
1371 \item this is a text for the second thing;
1372 \item etc.
1373 \end{enumerate}
1374 \end{verbatim}
1375
1376 \begin{enumerate}
1377 \item this is a text for the first thing;
1378 \item this is a text for the second thing;
1379 \item etc.
1380 \end{enumerate}
1381
1382 \paragraph{Example 2} The following \LaTeX~code illustrates how the environment is reacting to a given description:
1383 \begin{verbatim}
1384 \begin{enumerate}
1385 \item this is a text for the first thing;
1386 \item[description] this is a text for the second thing;
1387 \item etc.
1388 \end{enumerate}
1389 \end{verbatim}
1390
1391 \begin{enumerate}
1392 \item this is a text for the first thing;
1393 \item[description] this is a text for the second thing;
1394 \item etc.
1395 \end{enumerate}
1396
1397 \paragraph{Example 3} The following \LaTeX~code illustrates the alphabetic counter specification. Note that the parenthesis characters are directly rendered in the list:
1398 \begin{verbatim}
1399 \begin{enumerate}[(a)]
1400 \item this is a text for the first thing;
1401 \item this is a text for the second thing;
1402 \item etc.
1403 \end{enumerate}
1404 \end{verbatim}
1405
1406 \begin{enumerate}[(a)]
1407 \item this is a text for the first thing;
1408 \item this is a text for the second thing;
1409 \item etc.
1410 \end{enumerate}
1411
1412 \paragraph{Example 4} The following \LaTeX~code illustrates the roman counter specification. Note that the dot character is directly rendered in the list:
1413 \begin{verbatim}
1414 \begin{enumerate}[I.]
1415 \item this is a text for the first thing;
1416 \item this is a text for the second thing;
1417 \item etc.
1418 \end{enumerate}
1419 \end{verbatim}
1420
1421 \begin{enumerate}[I.]
1422 \item this is a text for the first thing;
1423 \item this is a text for the second thing;
1424 \item etc.
1425 \end{enumerate}
1426
1427 \subsection{Environment \texttt{enumdescriptionx}}
1428
1429 The environment \texttt{enumdescriptionx} extends the environment \texttt{enumdescription} by enabling a finer configuration with more parameters.
1430
1431 \paragraph{Syntax}
1432 \begin{verbatim}
1433 \begin{enumdescriptionx}[type]{counter\_prefix}{counter\_postfix}
1434 \item[desc] text
1435 \end{enumdescriptionx}
1436 \end{verbatim}
1437 where the \texttt{type} is the type of the enumeration. It may be one of:
1438 \begin{itemize}
1439 \item ``\texttt{i}'': for an enumeration with Roman numbers (this is the default),
1440 \item ``\texttt{1}'': for an enumeration with Arabic numbers,
1441 \item ``\texttt{a}'': for an enumeration with letters.
1442 \end{itemize}
1443 The text put in place of \texttt{desc} represents the text which may be emphasized in the description item.
1444 The text \texttt{counter\_prefix} is put before all the counter values in the enumeration.
1445 The text \texttt{counter\_postfix} is put after all the counter values in the enumeration.
1446
1447
1448 To change the rendering of the labels, you must redefined the command as:
1449 \begin{verbatim}
1450 \renewcommand{\enumdescriptionlabel}[1]{ ... #1 ... }
1451 \end{verbatim}
1452
1453
1454 \paragraph{Example} The following \LaTeX~code, using letter numbers, produces the enumerated description just below:
1455 \begin{verbatim}
1456 \begin{enumdescriptionx}[a]{$\langle$}{$\rangle$}
1457 \item[first thing] this is a text for the first thing;
1458 \item[second thing] this is a text for the second thing;
1459 \item[more] etc.
1460 \end{enumdescriptionx}
1461 \end{verbatim}
1462
1463 \begin{enumdescriptionx}[a]{$\langle$}{$\rangle$}
1464 \item[first thing] this is a text for the first thing;
1465 \item[second thing] this is a text for the second thing;
1466 \item[more] etc.
1467 \end{enumdescriptionx}
1468
1469
1470 \section{Footnotes}
1471
1472 The package \texttt{upmethodology-fmt} provides a set of commands allowing to save the reference number of a footnote and to recall this reference many time as required.
1473
1474 \begin{itemize}
1475 \item \texttt{{\textbackslash}savefootnote\{footnote text\}\{footnote id\}} \\
1476 put a footnote and mark it with the corresponding label. \\
1477 Example: \texttt{{\textbackslash}savefootnote\{This is an example of a recallable footnote\}\{footrecalla\}}\savefootnote{This is an example of a recallable footnote}{footrecalla};
1478 \item \texttt{{\textbackslash}savefootnote*\{footnote text\}\{footnote id\}} \\
1479 mark a footnote with the corresponding label but do not put in the current page. \\
1480 Example 1: \texttt{{\textbackslash}savefootnote*\{This is a second example of a recallable footnote\}\{footrecallb\}}\savefootnote*{This is a second example of a recallable footnote}{footrecallb}; \\
1481 Example 2: \texttt{{\textbackslash}savefootnote*\{This is a third example of a recallable footnote\}\{footrecallc\}}\savefootnote*{This is a third example of a recallable footnote}{footrecallc}.
1482 \item \texttt{{\textbackslash}reffootnote\{footnote id\}} \\
1483 recall the footnote reference without page number. \\
1484 Example 1: \texttt{{\textbackslash}reffootnote\{footrecalla\}}\reffootnote{footrecalla}$=B$; \\
1485 example 2: \texttt{{\textbackslash}reffootnote\{footrecallb\}}\reffootnote{footrecallb}$=A$; \\
1486 example 4: \texttt{{\textbackslash}reffootnote\{footrecalld\}}\reffootnote{footrecalld}$=?$.
1487 \item \texttt{{\textbackslash}reffootnote*\{footnote id\}} \\
1488 recall the footnote reference with the page number if different of the current page. \\
1489 Example 1: \texttt{{\textbackslash}reffootnote*\{footrecalla\}}\reffootnote*{footrecalla}; \\
1490 example 2: \texttt{{\textbackslash}reffootnote*\{footrecallb\}}\reffootnote*{footrecallb}; \\
1491 example 3: \texttt{{\textbackslash}reffootnote*\{footrecallc\}}\reffootnote*{footrecallc}; \\
1492 example 4: \texttt{{\textbackslash}reffootnote*\{footrecalld\}}\reffootnote*{footrecalld}.
1493 \end{itemize}
1494
1495 \section{UML diagrams on the side of paragraphs}
1496
1497 The package \texttt{upmethodology-fmt} provides an environment that makes it possible to put an UML diagram (or any other picture) on the side of a paragraph.
1498
1499 \begin{itemize}
1500 \item \texttt{{\textbackslash}begin\{umlinpar\}[width]\{picture\_path\}}\\\texttt{text}\\\texttt{{\textbackslash}end\{umlinpat\}} \\
1501 put the specified picture on the side of the given text. The optional parameter \texttt{width} corresponds to the desired width ofthe picture. By default it is \texttt{.5{\textbackslash}linewidth}.
1502 \end{itemize}
1503
1504 \begin{umlinpar}{figure_and_tex}
1505 This paragraph is an typical example of the usage of the environment \texttt{umlinpar}. To obtain it, the following \LaTeX\ code was typed: \\
1506 \texttt{{\textbackslash}begin\{umlinpar\}\{smalllogo\}} \\
1507 \texttt{This paragraph is an typical example of the usage of the environment {\textbackslash}texttt\{umlinpar\}.} \\
1508 \texttt{{\textbackslash}end\{umlinpar\}} \\
1509 \end{umlinpar}
1510
1511 \section{Date formatting}
1512
1513 Because the concept of date was important and unfortunately localized, this package provides a set of functions to define and extract information from dates (the supported date formats are described in table~\ref{tab:date.formats}):
1514
1515 \begin{itemize}
1516 \item \texttt{{\textbackslash}makedate\{day\}\{month\}\{year\}}\\
1517 allows you to create the text corresponding to the given date according to the current localized date format.
1518 \item \texttt{{\textbackslash}extractyear\{formatted\_date\}}\\
1519 extract the year field from a date respecting the localized date format.
1520 \item \texttt{{\textbackslash}extractmonth\{formatted\_date\}}\\
1521 extract the month field from a date respecting the localized date format.
1522 \item \texttt{{\textbackslash}extractday\{formatted\_date\}}\\
1523 extract the day field from a date respecting the localized date format.
1524 \end{itemize}
1525
1526 \begin{table}[ht]
1527 \begin{center}
1528 \begin{tabular}{|>{\ttfamily}l|l|}
1529 \hline
1530 yyyy/mm/dd & default format \\
1531 %mm/dd/yyyy & US format \\
1532 dd/mm/yyyy & french format \\
1533 \hline
1534 \end{tabular}
1535 \end{center}
1536 \caption{List of supported date formats}
1537 \label{tab:date.formats}
1538 \end{table}
1539
1540 \section{Text formatting}
1541
1542 The package \texttt{upmethodology-fmt} provides a set of commands to format the text.
1543
1544 \begin{itemize}
1545 \item \texttt{{\textbackslash}textsup\{text\}} \\
1546 put a text as exponent in text mode instead of the basic \LaTeX\ exponent in math mode. In opposite to the standard \LaTeX\ command \texttt{{\textbackslash}textsuperscript}, this command adds an extra space after the command when needed. \\
1547 Example: \texttt{{\textbackslash}textsup\{this is an exponent\}}\textsup{this is an exponent}this is the following text;
1548 \item \texttt{{\textbackslash}textup\{text\}} \\
1549 same as \texttt{{\textbackslash}textsup}.
1550 \item \texttt{{\textbackslash}textsub\{text\}} \\
1551 put a text as indice in text mode instead of the basic \LaTeX\ indice in math mode. In opposite to \texttt{{\textbackslash}textsubscript}, this command adds an extra space after the command when needed. In opposite to \texttt{{\textbackslash}textdown}, the size of the text is not changed in the text down. \\
1552 Example: \texttt{{\textbackslash}textsub\{this is an indice\}}\textsub{this is an indice}this is the following text;
1553 \item \texttt{{\textbackslash}textdown\{text\}} \\
1554 put a text as indice in text mode instead of the basic \LaTeX\ indice in math mode. In opposite to \texttt{{\textbackslash}textsubscript}, this command adds an extra space after the command when needed. In opposite to \texttt{{\textbackslash}textsub}, the size of the text is changed in the text down. \\
1555 Example: \texttt{{\textbackslash}textdown\{this is an indice\}}\textdown{this is an indice}this is the following text;
1556 \item \texttt{{\textbackslash}textsubscript\{text\}} \\
1557 put a text as indice in text mode instead of the basic \LaTeX\ indice in math mode. As for the standard \LaTeX\ command \texttt{{\textbackslash}textsuperscript}, this command does not add an extra space after the command. \\
1558 Example: \texttt{{\textbackslash}textsubscript\{this is an indice\}}\textsubscript{this is an indice}this is the following text;
1559 \item \texttt{{\textbackslash}Emph\{text\}} \\
1560 put a \emph{very important} text. This command is similar to the standard \LaTeX\ command \texttt{{\textbackslash}emph}. The difference is: \texttt{{\textbackslash}emph} is for ``important things''; and \texttt{{\textbackslash}Emph} is for ``very important things''.\\
1561 Example: This text is \texttt{{\textbackslash}emph\{important\}}, but this one is \texttt{{\textbackslash}Emph\{very important\}} \\
1562 gives: This text is \emph{important}, but this one is \Emph{very important};
1563 \item \texttt{{\textbackslash}makename[von]\{first name\}\{last name\}} \\
1564 format the specified people name components according to the document standards. By default, the format \texttt{first von last} is used. \\
1565 Example: \texttt{{\textbackslash}makename[von]\{Ludwig Otto Frederik Wilhelm\}\{Wittelsbach\}},\\
1566 ``\makename[von]{Ludwig Otto Frederik Wilhelm}{Wittelsbach}'';
1567 \item \texttt{{\textbackslash}upmmakename[von]\{first name\}\{last name\}\{separator\}} \\
1568 format the specified people name components according to the document standards. By default, the format \texttt{first von last} is used. \\
1569 Example: \texttt{{\textbackslash}upmmakename[von]\{Ludwig Otto Frederik Wilhelm\}\{Wittelsbach\}\{/\}}, \\
1570 ``\upmmakename[von]{Ludwig Otto Frederik Wilhelm}{Wittelsbach}{/}'';
1571 \item \texttt{{\textbackslash}makenamespacing\{name\}} \\
1572 format the specified name to be sure that the spaces after the points of the initials are demi-spaces. \\
1573 Example: \texttt{{\textbackslash}makenamespacing\{S\string.G\string.\}Galland}, \\
1574 ``\makenamespacing{S.G.}Galland'';
1575 \item \texttt{{\textbackslash}makelastname\{name\}} \\
1576 format the specified last/family name. \\
1577 Example: \texttt{{\textbackslash}makelastname\{Galland\}}, \\
1578 ``\makelastname{Galland}'';
1579 \item \texttt{{\textbackslash}makefirstname\{name\}} \\
1580 format the specified first name. \\
1581 Example: \texttt{{\textbackslash}makefirstname\{St\'ephane\}}, \\
1582 ``\makefirstname{St\'ephane}'';
1583 \item \texttt{{\textbackslash}prname[von]\{first name\}\{last name\}} \\
1584 \texttt{{\textbackslash}prname*[von]\{first name\}\{last name\}} \\
1585 format the specified people name components according to the document standards for \emph{Professor} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
1586 Example 1: \texttt{{\textbackslash}prname\{Pierre\}\{Martin\}}, ``\prname{Pierre}{Martin}''; \\
1587 Example 2: \texttt{{\textbackslash}prname*\{Pierre\}\{Martin\}}, ``\prname*{Pierre}{Martin}'';
1588 \item \texttt{{\textbackslash}drname[von]\{first name\}\{last name\}} \\
1589 \texttt{{\textbackslash}drname*[von]\{first name\}\{last name\}} \\
1590 format the specified people name components according to the document standards for \emph{Doctor} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
1591 Example 1: \texttt{{\textbackslash}drname\{Pierre\}\{Martin\}}, ``\drname{Pierre}{Martin}''; \\
1592 Example 2: \texttt{{\textbackslash}drname*\{Pierre\}\{Martin\}}, ``\drname*{Pierre}{Martin}'';
1593 \item \texttt{{\textbackslash}phdname[von]\{first name\}\{last name\}} \\
1594 \texttt{{\textbackslash}phdname*[von]\{first name\}\{last name\}} \\
1595 format the specified people name components according to the document standards for \emph{Philosophi\ae Doctor} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
1596 Example 1: \texttt{{\textbackslash}phdname\{Pierre\}\{Martin\}}, ``\phdname{Pierre}{Martin}''; \\
1597 Example 2: \texttt{{\textbackslash}phdname*\{Pierre\}\{Martin\}}, ``\phdname*{Pierre}{Martin}'';
1598 \item \texttt{{\textbackslash}scdname[von]\{first name\}\{last name\}} \\
1599 \texttt{{\textbackslash}scdname*[von]\{first name\}\{last name\}} \\
1600 format the specified people name components according to the document standards for \emph{Scienti\ae Doctor} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
1601 Example 1: \texttt{{\textbackslash}scdname\{Pierre\}\{Martin\}}, ``\scdname{Pierre}{Martin}''; \\
1602 Example 2: \texttt{{\textbackslash}scdname*\{Pierre\}\{Martin\}}, ``\scdname*{Pierre}{Martin}'';
1603 \item \texttt{{\textbackslash}mdname[von]\{first name\}\{last name\}} \\
1604 \texttt{{\textbackslash}mdname*[von]\{first name\}\{last name\}} \\
1605 format the specified people name components according to the document standards for \emph{Medicin\ae Doctor} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
1606 Example 1: \texttt{{\textbackslash}mdname\{Pierre\}\{Martin\}}, ``\mdname{Pierre}{Martin}''; \\
1607 Example 2: \texttt{{\textbackslash}mdname*\{Pierre\}\{Martin\}}, ``\mdname*{Pierre}{Martin}'';
1608 \item \texttt{{\textbackslash}pengname[von]\{first name\}\{last name\}} \\
1609 \texttt{{\textbackslash}pengname*[von]\{first name\}\{last name\}} \\
1610 format the specified people name components according to the document standards for \emph{Professional/Chartered Engineer} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
1611 Example 1: \texttt{{\textbackslash}pengname\{Pierre\}\{Martin\}}, ``\pengname{Pierre}{Martin}''; \\
1612 Example 2: \texttt{{\textbackslash}pengname*\{Pierre\}\{Martin\}}, ``\pengname*{Pierre}{Martin}'';
1613 \item \texttt{{\textbackslash}iengname[von]\{first name\}\{last name\}} \\
1614 \texttt{{\textbackslash}iengname*[von]\{first name\}\{last name\}} \\
1615 format the specified people name components according to the document standards for \emph{Incorporated Engineer} title. By default, the format \texttt{first von last} is used. The star-ed version is post-fixed, the non-star-ed version is prefixed. \\
1616 Example 1: \texttt{{\textbackslash}iengname\{Pierre\}\{Martin\}}, ``\iengname{Pierre}{Martin}''; \\
1617 Example 2: \texttt{{\textbackslash}iengname*\{Pierre\}\{Martin\}}, ``\iengname*{Pierre}{Martin}''.
1618 \end{itemize}
1619
1620
1621 \section{Symbols}
1622
1623 \subsection{Symbols in Text Mode}
1624
1625 The package \texttt{upmethodology-fmt} provides several symbols in text mode, and described inside the table~\ref{tab:symbols:text}.
1626
1627 \begin{table}[ht]
1628 \begin{center}
1629 \begin{tabular}{|>{\ttfamily}l|l|}
1630 \hline
1631 {\textbackslash}arakhneorg & \arakhneorg \\
1632 {\textbackslash}copyright & \copyright \\
1633 {\textbackslash}trademark & \trademark \\
1634 {\textbackslash}regmark & \regmark \\
1635 {\textbackslash}smalltrade & \smalltrade \\
1636 {\textbackslash}smallreg & \smallreg \\
1637 {\textbackslash}smallcopy & \smallcopy \\
1638 {\textbackslash}ust & \ust \\
1639 {\textbackslash}und & \und \\
1640 {\textbackslash}urd & \urd \\
1641 {\textbackslash}uth & \uth \\
1642 \hline
1643 \end{tabular}
1644 \end{center}
1645 \caption{List of symbols}
1646 \label{tab:symbols:text}
1647 \end{table}
1648
1649 \subsection{Symbols in Math Mode}
1650
1651 The package \texttt{upmethodology-fmt} provides several symbols in math mode, and described inside the table~\ref{tab:symbols:math}.
1652
1653 \begin{table}[ht]
1654 \begin{center}
1655 \begin{tabular}{|>{\ttfamily}l|l|}
1656 \hline
1657 \multicolumn{2}{|c|}{Sets} \\
1658 \hline
1659 {\textbackslash}R & \R \\
1660 {\textbackslash}N & \N \\
1661 {\textbackslash}Z & \Z \\
1662 {\textbackslash}Q & \Q \\
1663 {\textbackslash}C & \C \\
1664 {\textbackslash}powerset p & $\powerset p$ \\
1665 \hline
1666 \multicolumn{2}{|c|}{Operators} \\
1667 \hline
1668 {\textbackslash}sgn expr & $\sgn expr$ \\
1669 \hline
1670 \end{tabular}
1671 \end{center}
1672 \caption{List of symbols}
1673 \label{tab:symbols:math}
1674 \end{table}
1675
1676 \section{Bibliography}
1677
1678 The package \texttt{upmethodology-fmt} provides a set of commands allowing to manage the bibliography. The default bibliography style is \texttt{abbr}.
1679
1680 \begin{itemize}
1681 \item \texttt{{\textbackslash}bibliographystyle\{style\}} \\
1682 set the bibliography style to use. \\
1683 Example: \texttt{{\textbackslash}bibliographystyle\{alpha\}};
1684 \item \texttt{{\textbackslash}bibliography\{file\}} \\
1685 set the \textsc{Bib}\TeX\ file to use. \\
1686 Example: \texttt{{\textbackslash}bibliography\{mybib\}};
1687 \item \texttt{{\textbackslash}bibsize\{size\}} \\
1688 set the font size used for the bibliography section. \\
1689 Example: \texttt{{\textbackslash}bibsize\{{\textbackslash}Huge\}};
1690 \end{itemize}
1691
1692 \section{Theorems and Mathematic Environments}\label{sec:theoremdefinition}
1693
1694 The package \texttt{upmethodology-fmt} defines several environments and commands that are based on the \texttt{theorem} or the math API of \LaTeX.
1695
1696 \subsection{Definition of a new theorem environment}
1697
1698 The theorem API from this package is based on the standard \texttt{tcolorbox} package.
1699 If you want to create a new theorem environment based on the style provided by this package, you could invoke \texttt{{\textbackslash}declareupmtheorem}:
1700
1701 \paragraph{Syntax} \mbox{}\\
1702 \texttt{{\textbackslash}declareupmtheorem[name of the tcolorbox style]\{name of the \LaTeX\ environment\}\{label of the theorem\}\{title of the theorems' list\}\{prefix for the label keys\}\{name of the theorem's list\}\{command for formating the source\}}
1703
1704 This command defines:
1705 \begin{itemize}
1706 \item the environment with the given "name of the \LaTeX\ environment", and
1707 \item the command \texttt{{\textbackslash}listof$\langle$name of the \LaTeX\ environment$\rangle$s}.
1708 \end{itemize}
1709
1710 The \texttt{name of the tcolorbox style} is the name of the tcolorbox style to be used. This style must be defined according to the \texttt{tcolorbox} package documentation. By default, it is \texttt{upmdefinition}.
1711
1712 The \texttt{label of the theorem} is the text to put in the theorem header, e.g., \texttt{Definition}.
1713
1714 The \texttt{title of the theorems' list} is used by the command \texttt{{\textbackslash}listof$\langle$name of the \LaTeX\ environment$\rangle$s} as the title of the associated chapter/section.
1715
1716 By default, the theorem environment defines a label for the theorem box. The \texttt{prefix for the label keys} is the prefix that is automatically appended to the label. For example, if this prefix is set to "\texttt{prefix}", and the theorem is invoked with a label value "\texttt{thekey}", then the theorem environment will automatically generate the command \texttt{{\textbackslash}label\{prefix:thekey\}} in the theorem environment.
1717
1718 The \texttt{name of the theorems' list} is identifier of the list in which the theorem adds entries. This list could be displayed with the command \texttt{{\textbackslash}listof$\langle$name of the \LaTeX\ environment$\rangle$s}.
1719
1720 The \texttt{command for formating the source} is \LaTeX\ command that could be followed by the source text of theorem. It is usually used for formatting this source text in the lower part of the theorem box.
1721
1722 \begin{upmcaution}
1723 The command \texttt{{\textbackslash}declareupmtheorem} can be used only inside the preamble of your document.
1724 \end{upmcaution}
1725
1726 \subsection{Using a defined theorem}
1727
1728 After defining an environment, you could use it as a regular \LaTeX\ environment, whitch takes three parameters:
1729 \begin{itemize}
1730 \item the title of the theorem in the box,
1731 \item the key for the implicit \texttt{{\textbackslash}label} command, and
1732 \item the optional argument that is the text of the source. The source of the theorem is rendered in the lower part of the theorem box. Usually, it corecponds to the reference to a scientific article or an Internet page.
1733 \end{itemize}
1734
1735 \paragraph{Example 1} The following code define the environment \texttt{mytheorem} and use it without source text:
1736 \begin{verbatim}
1737 \documentclass{upmethodology-document}
1738 \declareupmtheorem{mytheorem}{My Theorem}{List of my Theorems}{thm}{mytheorem}{\textbf}
1739 \begin{document}
1740
1741 Read the theorem \ref{thm:mytheo}.
1742
1743 \begin{mytheorem}{Theorem of Everything}{mytheo}
1744 This is the theorem of Evereything.
1745 \end{mytheorem}
1746
1747 \end{document}
1748 \end{verbatim}
1749 gives the result: \\[.5cm]
1750 Read the theorem \ref{thm:mytheo1}.
1751 \begin{mytheorem}{Theorem of Everything}{mytheo1}
1752 This is the theorem of Everything.
1753 \end{mytheorem}
1754
1755 \paragraph{Example 2} The following code define the environment \texttt{mytheorem} and use it with a source text:
1756 \begin{verbatim}
1757 \documentclass{upmethodology-document}
1758 \declareupmtheorem{mytheorem}{My Theorem}{List of my Theorems}{thm}{mytheorem}{\textbf}
1759 \begin{document}
1760
1761 Read the theorem \ref{thm:mytheo2}.
1762
1763 \begin{mytheorem}{Theorem of Everything}{mytheo2}[description of the source]
1764 This is the theorem of Evereything.
1765 \end{mytheorem}
1766
1767 \end{document}
1768 \end{verbatim}
1769 gives the result: \\[.5cm]
1770 Read the theorem \ref{thm:mytheo2}.
1771 \begin{mytheorem}{Theorem of Everything}{mytheo2}[description of the source]
1772 This is the theorem of Everything.
1773 \end{mytheorem}
1774
1775 \paragraph{Reference the defined theorem} You could add a reference to a defined theorem by using one of the following commands:
1776 \begin{itemize}
1777 \item \texttt{{\textbackslash}ref\{$\langle$label of the theorem$\rangle$:$\langle$Label of the theorem$\rangle$\}} for showing the definition's number, e.g., \ref{thm:mytheo2} for the theorem above.
1778 \item \texttt{{\textbackslash}pageref\{$\langle$label of the theorem$\rangle$:$\langle$Label of the theorem$\rangle$\}} for showing the definition's page, e.g., \pageref{thm:mytheo2} for the theorem above.
1779 \end{itemize}
1780
1781 \subsection{Using the list of theorems}
1782
1783 When a theorem is defined, the it is possible to creation a chapter (in books or reports) or a section (in articles) that lists all the defined theorems.
1784 In order to do so, you could use the "listof" command that is automatically created when defining the theorem.
1785 The following code define the environment \texttt{mytheorem} and shows the list of defined \texttt{mytheorem}s:
1786 \begin{verbatim}
1787 \documentclass{upmethodology-document}
1788 \declareupmtheorem{mytheorem}{My Theorem}{List of my Theorems}{thm}{mytheorem}{\textbf}
1789 \begin{document}
1790
1791 \begin{mytheorem}{Theorem of Everything}{mytheo}
1792 This is the theorem of Evereything.
1793 \end{mytheorem}
1794
1795 \listofmytheorems
1796
1797 \end{document}
1798 \end{verbatim}
1799
1800 \subsection{\texttt{definition}}
1801
1802 The package \texttt{upmethodology-fmt} defines the environment \texttt{definition} to put a definition in your document. This environment is based on the \texttt{theorem} environment explained in the previous sections. The \texttt{definition} takes one optional parameter: the name of the definition.
1803
1804 \paragraph{Example 1} The following \LaTeX\ code:
1805 \begin{verbatim}
1806 \begin{definition}{Name of the definition}{Label of the definition}
1807 Text of the definition.
1808 \end{definition}
1809 \end{verbatim}
1810
1811 produces:
1812
1813 \begin{definition}{Name of the definition}{Label of the definition}
1814 Text of the definition.
1815 \end{definition}
1816
1817 It is also possible to provide the source of the definition by adding the optional parameter as in the following example.
1818
1819 \paragraph{Example 2}
1820 \begin{verbatim}
1821 \begin{definition}{Name of the definition}{Label of the definition}[This is the source]
1822 Text of the definition.
1823 \end{definition}
1824 \end{verbatim}
1825
1826 The result of this definition declaration is:
1827
1828 \begin{definition}{Name of the definition}{Label of the definition}[This is the source]
1829 Text of the definition.
1830 \end{definition}
1831
1832 \paragraph{Reference the definition} You could add a reference to a definition by using one of the following commands:
1833 \begin{itemize}
1834 \item \texttt{{\textbackslash}defref\{$\langle$Label of the definition$\rangle$\}} for showing the definition's number, e.g., \defref{Label of the definition} for the definition above.
1835 \item \texttt{{\textbackslash}defpageref\{$\langle$Label of the definition$\rangle$\}} for showing the definition's page, e.g., \defpageref{Label of the definition} for the definition above.
1836 \end{itemize}
1837
1838 \paragraph{Change the colors of the definition:} You could change the colors of the \texttt{definition} environment by redefining the colors below with one of the commands \texttt{{\textbackslash}definecolor} or \texttt{{\textbackslash}colorlet}:
1839 \begin{itemize}
1840 \item \texttt{definitionbackground} is the color of the background of the definition;
1841 \item \texttt{definitionborder} is the color of the frame and of the header's background;
1842 \item \texttt{definitionheaderforeground} is the color of the text in the header of the definition;
1843 \item \texttt{definitiontextforeground} is the color of the text in the body of the definition.
1844 \item \texttt{definitionsourceforeground} is the color of the text in the lower part of the definition in which the source is rendered.
1845 \end{itemize}
1846
1847 \paragraph{Example of color redefinition:} The following \LaTeX\ code:
1848 \begin{verbatim}
1849 \definecolor{definitionheaderforeground}{rgb}{.3,.5,.8}
1850 \colorlet{definitionbackground}{gray!20}
1851 \colorlet{definitionborder}{red}
1852 \begin{definition}{Name of the definition}{Label of the definition}
1853 Text of the definition.
1854 \end{definition}
1855 \end{verbatim}
1856
1857 produces:
1858
1859 \definecolor{definitionheaderforeground}{rgb}{.3,.5,.8}
1860 \colorlet{definitionbackground}{gray!20}
1861 \colorlet{definitionborder}{red}
1862 \begin{definition}{Name of the definition}{Label of the definition}
1863 Text of the definition.
1864 \end{definition}
1865
1866 \section{Algorithms}\label{sec:algorithms}
1867
1868 If you have included the \LaTeX\ packages for algorithm floatings, e.g., \texttt{algorithm}, the default style for the algorithms may e altered with the following colors:
1869 \begin{itemize}
1870 \item \texttt{algorithmcaptionlabel}: is the color of the text for the label of the algorithms, e.g., \texttt{Algorithm 1:};
1871 \item \texttt{algorithmcaption}: is the color of the text of the name of the description;
1872 \item \texttt{algorithmborder}: is the color of the rules that are drawn in the algorithm frame.
1873 \end{itemize}
1874
1875 \section{Emphazing Box}
1876
1877 If you want to create a text that is emphazed with a box, you could use the environment:
1878
1879 \paragraph{Syntax} \texttt{{\textbackslash}begin\{emphbox\}[width] text {\textbackslash}end\{emphbox\}}
1880
1881 \paragraph{Example} The following \LaTeX\ code:
1882 \begin{verbatim}
1883 \begin{emphbox}[.7\linewidth]
1884 This is an emphazed text.
1885 \end{emphbox}
1886 \end{verbatim}
1887 produces:
1888
1889 \begin{emphbox}[.7\linewidth]
1890 This is an emphazed text.
1891 \end{emphbox}
1892
1893 \paragraph{Emphazing Box with a Title} Three additional boxes are provided. All of them are output a title, and has a different background color: \\
1894 \texttt{{\textbackslash}begin\{titleemphbox\}[width]\{title\} text {\textbackslash}end\{titleemphbox\}} \\
1895 \texttt{{\textbackslash}begin\{titleemphbox2\}[width]\{title\} text {\textbackslash}end\{titleemphbox2\}} \\
1896 \texttt{{\textbackslash}begin\{titleemphbox3\}[width]\{title\} text {\textbackslash}end\{titleemphbox3\}}
1897
1898 The following \LaTeX\ code:
1899 \begin{verbatim}
1900 \begin{titleemphbox}[.7\linewidth]{The title}
1901 This is an emphazed text.
1902 \end{titleemphbox}
1903 \end{verbatim}
1904 produces:
1905
1906 \begin{titleemphbox}[.7\linewidth]{The title}
1907 This is an emphazed text.
1908 \end{titleemphbox}
1909
1910
1911 The following \LaTeX\ code:
1912 \begin{verbatim}
1913 \begin{titleemphbox2}[.7\linewidth]{The title}
1914 This is an emphazed text.
1915 \end{titleemphbox2}
1916 \end{verbatim}
1917 produces:
1918
1919 \begin{titleemphbox2}[.7\linewidth]{The title}
1920 This is an emphazed text.
1921 \end{titleemphbox2}
1922
1923
1924 The following \LaTeX\ code:
1925 \begin{verbatim}
1926 \begin{titleemphbox3}[.7\linewidth]{The title}
1927 This is an emphazed text.
1928 \end{titleemphbox3}
1929 \end{verbatim}
1930 produces:
1931
1932 \begin{titleemphbox3}[.7\linewidth]{The title}
1933 This is an emphazed text.
1934 \end{titleemphbox3}
1935
1936
1937
1938 \paragraph{Change the colors of the emphazing box} You could change the colors of the \texttt{emphbox} environment by redefining the colors below with one of the commands \texttt{{\textbackslash}definecolor} or \texttt{{\textbackslash}colorlet}:
1939 \begin{itemize}
1940 \item \texttt{emphboxbackground} is the color of the background of the environment;
1941 \item \texttt{emphboxborder} is the color of the frame;
1942 \item \texttt{emphboxtext} is the color of the text in the body of the environment.
1943 \item \texttt{emphboxbackgroundb} is the color of the background of the second environment with title;
1944 \item \texttt{emphboxbackgroundc} is the color of the background of the third environment with title;
1945 \end{itemize}
1946
1947 \paragraph{Example of color redefinition} The following \LaTeX\ code:
1948 \begin{verbatim}
1949 \colorlet{emphboxbackground}{gray!20}
1950 \colorlet{emphboxborder}{red}
1951 \begin{emphbox}
1952 This is an emphazed text.
1953 \end{emphbox}
1954 \end{verbatim}
1955 produces:
1956
1957 \colorlet{emphboxbackground}{gray!20}
1958 \colorlet{emphboxborder}{red}
1959 \begin{emphbox}
1960 This is an emphazed text.
1961 \end{emphbox}
1962
1963
1964 \section{Framed Boxes or Mini Pages}
1965
1966 There is two API that are available for created framed boxes. The first one is \texttt{tcolorbox}, that is the one use by default in this package. The second approach is based on the \texttt{framedminipage} commands defined in this package.
1967
1968 \subsection{With tcolorbox}
1969
1970 \texttt{tcolorbox} provides an environment for colored and framed text boxes with a heading line. Optionally, such a box can be split in an upper and a lower part. The package
1971 \texttt{tcolorbox} is included by default, with its \texttt{theorems} extension.
1972 It can be used for the setting of \LaTeX\ examples where one part of the box displays the source code and the other part shows the output. Another common use case is the setting of theorems (see Section \ref{sec:theoremdefinition}).
1973
1974 More information could be found on \url{https://www.ctan.org/pkg/tcolorbox} or \url{https://github.com/T-F-S/tcolorbox}.
1975
1976 \subsection{With framedminipage}
1977
1978 Standard \LaTeX\ distribution provides the \texttt{minipage} environment. This environment allows you to put a small piece of page inside your document. The package \texttt{upmethodology-fmt} provides two framed extensions of the original \texttt{minipage} environment: \texttt{framedminipage} and \texttt{framedcolorminipage}.
1979
1980 The prototypes of there two new environments are, respectively:
1981 \begin{itemize}
1982 \item \texttt{{\textbackslash}begin\{framedminipage\}\{width\} \dots {\textbackslash}end\{framedminipage\}}
1983 \item \texttt{{\textbackslash}begin\{framedcolorminipage\}\{width\}\{border\string_color\}\{background\string_color\} \dots {\textbackslash}end\{framedcolorminipage\}}
1984 \end{itemize}
1985
1986 \paragraph{Example of \texttt{framedminipage}} The following \LaTeX\ code:
1987 \begin{verbatim}
1988 \begin{framedminipage}{.75\linewidth}
1989 This is a text inside a framed minipage.
1990 \end{framedminipage}
1991 \end{verbatim}
1992 produces:
1993 \begin{framedminipage}{.75\linewidth}
1994 This is a text inside a framed minipage.
1995 \end{framedminipage}
1996
1997 \paragraph{Example of \texttt{framedcolorminipage}} The following \LaTeX\ code:
1998 \begin{verbatim}
1999 \begin{framedcolorminipage}{.75\linewidth}{red}{yellow}
2000 This is a text inside a framed minipage with colors.
2001 \end{framedcolorminipage}
2002 \end{verbatim}
2003 produces:
2004 \begin{framedcolorminipage}{.75\linewidth}{red}{yellow}
2005 This is a text inside a framed minipage with colors.
2006 \end{framedcolorminipage}
2007
2008 \section{Message Boxes}
2009
2010 The package \texttt{upmethodology-fmt} provides a set of environment to put emphasis message boxes in the text. Three types of boxes are supported: caution, information, and question.
2011
2012 \par
2013 \begin{tabularx}{\linewidth}{XX}
2014
2015 \texttt{{\textbackslash}begin\{upmcaution\}{[}width{]}} \newline
2016 \texttt{This is an example of a caution message.} \newline
2017 \texttt{{\textbackslash}end\{upmcaution\}}
2018 &
2019 \raisebox{-\height}{\begin{upmcaution}This is an example of a caution message.\end{upmcaution}}
2020 \\
2021
2022 \texttt{{\textbackslash}begin\{upminfo\}{[}width{]}} \newline
2023 \texttt{This is an example of an information message.} \newline
2024 \texttt{{\textbackslash}end\{upminfo\}}
2025 &
2026 \raisebox{-\height}{\begin{upminfo}This is an example of an information message.\end{upminfo}}
2027 \\
2028
2029 \texttt{{\textbackslash}begin\{upmnote\}{[}width{]}} \newline
2030 \texttt{This is an example of a note message.} \newline
2031 \texttt{{\textbackslash}end\{upmnote\}}
2032 &
2033 \raisebox{-\height}{\begin{upmnote}This is an example of a note message.\end{upmnote}}
2034 \\
2035
2036 \texttt{{\textbackslash}begin\{upmquestion\}{[}width{]}} \newline
2037 \texttt{This is an example of a question message.} \newline
2038 \texttt{{\textbackslash}end\{upmquestion\}}
2039 &
2040 \raisebox{-\height}{\begin{upmquestion}This is an example of a question message.\end{upmquestion}}
2041 \\
2042
2043 \texttt{{\textbackslash}begin\{upmaction\}{[}width{]}} \newline
2044 \texttt{This is an example of an action message.} \newline
2045 \texttt{{\textbackslash}end\{upmaction\}}
2046 &
2047 \raisebox{-\height}{\begin{upmaction}This is an example of an action message.\end{upmaction}}
2048 \\
2049
2050 \end{tabularx}
2051
2052 \section{Additional Commands for the Table of Content}
2053
2054 The command \texttt{{\textbackslash}newpageintoc} makes it possible to insert a page break inside the table of contents (toc).
2055 It may be used to avoid orphan titles in the toc.
2056
2057 \section{Additional Document Sectioning Commands}
2058
2059 The package \texttt{upmethodology-fmt} provides several commands that permit to create special sections.
2060
2061 \subsection{Non-numbered Part in Table of Content}
2062
2063 If you want to add a document part that has no part number but appearing inside the table of content, the classical \LaTeX\ commands \texttt{{\textbackslash}part} and \texttt{{\textbackslash}part*} are inefficient. Indeed, \texttt{{\textbackslash}part} is adding a numbered part inside the table of content, and \texttt{{\textbackslash}part*} is adding an unnumbered part but not inside the table of content.
2064
2065 To add an unnumbered part inside the table of content, you could use one of the commands:
2066
2067 \paragraph{Syntax 1} \texttt{{\textbackslash}parttoc[toctitle]\{title\}}
2068
2069 \paragraph{Syntax 2} \texttt{{\textbackslash}parttoc*[toctitle]\{title\}}
2070
2071 The commands \texttt{{\textbackslash}parttoc} and \texttt{{\textbackslash}parttoc*} have the same effect except that \texttt{{\textbackslash}parttoc*} aligns the part's title to the other numbered parts' titles; and \texttt{{\textbackslash}parttoc} not.
2072
2073 \subsection{Non-numbered Chapter in Table of Content}
2074
2075 If you want to add a document chapter that has no chapter number but appearing inside the table of content, the classical \LaTeX\ commands \texttt{{\textbackslash}chapter} and \texttt{{\textbackslash}chapter*} are inefficient. Indeed, \texttt{{\textbackslash}chapter} is adding a numbered chapter inside the table of content, and \texttt{{\textbackslash}chapter*} is adding an unnumbered chapter but not inside the table of content.
2076
2077 To add an unnumbered chapter inside the table of content, you could use one of the commands:
2078
2079 \paragraph{Syntax 1} \texttt{{\textbackslash}chaptertoc[toctitle]\{title\}}
2080
2081 \paragraph{Syntax 2} \texttt{{\textbackslash}chaptertoc*[toctitle]\{title\}}
2082
2083 The commands \texttt{{\textbackslash}chaptertoc} and \texttt{{\textbackslash}chaptertoc*} have the same effect except that \texttt{{\textbackslash}chaptertoc*} aligns the chapter's title to the other numbered chapters' titles; and \texttt{{\textbackslash}chaptertoc} not.
2084
2085 \subsection{Non-numbered Section in Table of Content}
2086
2087 If you want to add a document section that has no a section number but appearing inside the table of content, the classical \LaTeX\ commands \texttt{{\textbackslash}section} and \texttt{{\textbackslash}section*} are inefficient. Indeed, \texttt{{\textbackslash}section} add a numbered section inside the table of content, and \texttt{{\textbackslash}section*} adds an unnumbered section but not inside the table of content.
2088
2089 To add an unnumbered section inside the table of content, you could use one of the commands:
2090
2091 \paragraph{Syntax 1} \texttt{{\textbackslash}sectiontoc[toctitle]\{title\}}
2092
2093 \paragraph{Syntax 2} \texttt{{\textbackslash}sectiontoc*[toctitle]\{title\}}
2094
2095 The commands \texttt{{\textbackslash}sectiontoc} and \texttt{{\textbackslash}sectiontoc*} have the same effect except that \texttt{{\textbackslash}sectiontoc*} aligns the section's title to the other numbered sections' titles; and \texttt{{\textbackslash}sectiontoc} not.
2096
2097 \subsection{Non-numbered Subsection in Table of Content}
2098
2099 If you want to add a document subsection that has no subsection number but appearing inside the table of content, the classical \LaTeX\ commands \texttt{{\textbackslash}subsection} and \texttt{{\textbackslash}subsection*} are inefficient. Indeed, \texttt{{\textbackslash}subsection} is adding a numbered subsection inside the table of content, and \texttt{{\textbackslash}subsection*} is adding an unnumbered subsection but not inside the table of content.
2100
2101 To add an unnumbered subsection inside the table of content, you could use one of the commands:
2102
2103 \paragraph{Syntax 1} \texttt{{\textbackslash}subsectiontoc[toctitle]\{title\}}
2104
2105 \paragraph{Syntax 2} \texttt{{\textbackslash}subsectiontoc*[toctitle]\{title\}}
2106
2107 The commands \texttt{{\textbackslash}subsectiontoc} and \texttt{{\textbackslash}subsectiontoc*} have the same effect except that \texttt{{\textbackslash}subsectiontoc*} aligns the subsection's title to the other numbered subsections' titles; and \texttt{{\textbackslash}subsectiontoc} not.
2108
2109 \subsection{Non-numbered Subsubsection in Table of Content}
2110
2111 If you want to add a document subsubsection that has no subsubsection number but appearing inside the table of content, the classical \LaTeX\ commands \texttt{{\textbackslash}subsubsection} and \texttt{{\textbackslash}subsubsection*} are inefficient. Indeed, \texttt{{\textbackslash}subsubsection} is adding a numbered subsubsection inside the table of content, and \texttt{{\textbackslash}subsubsection*} is adding an unnumbered subsubsection but not inside the table of content.
2112
2113 To add an unnumbered subsubsection inside the table of content, you could use one of the commands:
2114
2115 \paragraph{Syntax 1} \texttt{{\textbackslash}subsubsectiontoc[toctitle]\{title\}}
2116
2117 \paragraph{Syntax 2} \texttt{{\textbackslash}subsubsectiontoc*[toctitle]\{title\}}
2118
2119 The commands \texttt{{\textbackslash}subsubsectiontoc} and \texttt{{\textbackslash}subsubsectiontoc*} have the same effect except that \texttt{{\textbackslash}subsubsectiontoc*} aligns the subsubsection's title to the other numbered subsubsections' titles; and \texttt{{\textbackslash}subsubsectiontoc} not.
2120
2121 \subsection{Chapter with different labels in TOC, headers and document}
2122
2123 If you want to control the labels in the table of contents (TOC), the headers and the document for a chapter, the classical \LaTeX\ commands \texttt{{\textbackslash}chapter} and \texttt{{\textbackslash}chapter*} are inefficient.
2124
2125 \paragraph{Syntax} \texttt{{\textbackslash}chapterfull[toctitle]\{title\}\{headertitle\}}
2126
2127 The command create a chapter with the given label ``\texttt{title}'' in the core part of the document, with the given label ``\texttt{toctitle}'' in the table of contents, and with the label ``\texttt{headertitle}'' in the headers.
2128
2129 \subsection{Section with different labels in TOC, headers and document}
2130
2131 If you want to control the labels in the table of contents (TOC), the headers and the document for a section, the classical \LaTeX\ commands \texttt{{\textbackslash}section} and \texttt{{\textbackslash}section*} are inefficient.
2132
2133 \paragraph{Syntax} \texttt{{\textbackslash}sectionfull[toctitle]\{title\}\{headertitle\}}
2134
2135 The command create a section with the given label ``\texttt{title}'' in the core part of the document, with the given label ``\texttt{toctitle}'' in the table of contents, and with the label ``\texttt{headertitle}'' in the headers.
2136
2137
2138 %###########################################################
2139
2140 \chapter{Package upmethodology-document}
2141
2142 \begin{center}
2143 \texttt{Version: \VERdoc}
2144 \end{center}
2145
2146 The package \texttt{upmethodology-document} provides base functions to manage document information (project, subproject, authors...).
2147
2148 \section{Document Information and Declaration}
2149
2150 The informations associated to an UP document are:
2151 \begin{itemize}
2152 \item \texttt{{\textbackslash}theupmproject} is the name of the project for which the document was produced;
2153 \item \texttt{{\textbackslash}theupmsubproject} is the name of the sub-project for which the document was produced;
2154 \item \texttt{{\textbackslash}theupmdocname} is the name of the document;
2155 \item \texttt{{\textbackslash}theupmdocref} is the reference number of the document;
2156 \item \texttt{{\textbackslash}theupmfulldocname} is the complete name of the document (composing by the project, subp-project and name of the document).
2157 \end{itemize}
2158
2159 You could declare the information about your document with one of the following functions: \\
2160 \texttt{{\textbackslash}declaredocument\{project\}\{name\}\{ref\}} \\
2161 \texttt{{\textbackslash}declaredocumentex\{project\}\{subproject\}\{name\}\{ref\}} \\
2162 where the parameters are:
2163 \begin{itemize}
2164 \item \texttt{project} is the name of the project the document belongs to;
2165 \item \texttt{subproject} is the name of the sub-project the document belongs to;
2166 \item \texttt{name} is the name of the document;
2167 \item \texttt{ref} is the reference number of the document.
2168 \end{itemize}
2169
2170 \section{Abstract and Key-words}
2171
2172 You are able to declare the abstract and the key-words for your document. Both are basically used by the back page package.
2173
2174 \subsection{Declarations}
2175
2176 The command \texttt{{\textbackslash}setdocabstract} is for entering the docment's abstract:\\
2177 \texttt{{\textbackslash}setdocabstract{[}lang{]}\{abstract\_text\}} \\
2178 where \texttt{abstract\_text} is the text of your abstract and \texttt{lang} designates for which language the abstract text is for. If the language is not specified, this command uses the current document language.
2179
2180 The command \texttt{{\textbackslash}setdockeywords} is for entering the document's key-words:\\
2181 \texttt{{\textbackslash}setdockeywords{[}lang{]}\{keywords\}} \\
2182 where \texttt{keywords} is the list of key-words and \texttt{lang} designates for which language the key-words are for. If the language is not specified, this command uses the current document language.
2183
2184 \subsection{Rendering}
2185
2186 The command \texttt{{\textbackslash}theupmdocabstract} is expanded with the abstract text:\\
2187 \texttt{{\textbackslash}theupmdocabstract}
2188
2189 The command \texttt{{\textbackslash}theupmdockeywords} is expanded with the key-words:\\
2190 \texttt{{\textbackslash}theupmdockeywords}
2191
2192 \section{Document Summary}
2193
2194 You can obtain a document summary with the command \texttt{{\textbackslash}upmdocumentsummary{[}width{]}} which produces:
2195
2196 \upmdocumentsummary
2197
2198 \section{Change Icons}
2199
2200 By default, this package uses the logo of \arakhneorg as icons. You could change them with the commands:
2201
2202 \begin{itemize}
2203 \item \texttt{{\textbackslash}defupmsmalllogo\{filename\}} defines the small logo used in the headers for instance;
2204 \item \texttt{{\textbackslash}defupmlogo\{filename\}} defines the logo used on the front page for instance.
2205 \end{itemize}
2206
2207 The logos' filenames are accessible with the functions \texttt{{\textbackslash}theupmsmalldoclogo} and \texttt{{\textbackslash}theupmdoclogo}.
2208
2209 \section{Document Authors}
2210
2211 An author is someone who participates to the writing of the document. You could register author identities with: \\
2212 \texttt{{\textbackslash}addauthor[email]\{firstname\}\{name\}} \\
2213 \texttt{{\textbackslash}addauthor*[email]\{firstname\}\{name\}\{comment\}} \\
2214 \texttt{{\textbackslash}addauthorvalidator[email]\{firstname\}\{name\}} \\
2215 \texttt{{\textbackslash}addauthorvalidator*[email]\{firstname\}\{name\}\{comment\}}
2216
2217 The list of the authors is accessible by two means:
2218 \begin{itemize}
2219 \item \texttt{{\textbackslash}theauthorlist} is a coma-separated list of the authors' names;
2220 \item \texttt{{\textbackslash}upmdocumentauthors} produces an array of all the authors (see below for an example).
2221 \end{itemize}
2222
2223 \upmdocumentauthors
2224
2225 You could test if a string is the name of the author with:
2226 \begin{itemize}
2227 \item \texttt{{\textbackslash}ifdocumentauthor\{lowercasename\}\{then\}\{else\}}; the first parameter \textbf{must} be lower case. If the \texttt{lowercasename} is the name of one of the authors, then the \texttt{then} clause is expanded, otherwise the \texttt{else} clause is expanded.
2228 \end{itemize}
2229
2230 \upmdocumentauthors
2231
2232 \section{Document Validators}
2233
2234 A validator is someone who participates to the validation of the document. You could register validator identities with: \\
2235 \texttt{{\textbackslash}addvalidator[email]\{firstname\}\{name\}} \\
2236 \texttt{{\textbackslash}addvalidator*[email]\{firstname\}\{name\}\{comment\}} \\
2237 \texttt{{\textbackslash}addauthorvalidator[email]\{firstname\}\{name\}} \\
2238 \texttt{{\textbackslash}addauthorvalidator*[email]\{firstname\}\{name\}\{comment\}}
2239
2240 The list of the validators is accessible by two means:
2241 \begin{itemize}
2242 \item \texttt{{\textbackslash}thevalidatorlist} is a coma-separated list of the validator's names;
2243 \item \texttt{{\textbackslash}upmdocumentvalidators} produces an array of all the validators (see below for an example).
2244 \end{itemize}
2245
2246 \upmdocumentvalidators
2247
2248 \section{Informed People}
2249
2250 An informed people is someone who receives the document to be informed about its content. You could register informed people identities with: \\
2251 \texttt{{\textbackslash}addinformed[email]\{firstname\}\{name\}} \\
2252 \texttt{{\textbackslash}addinformed*[email]\{firstname\}\{name\}\{comment\}}
2253
2254 The list of the informed people is accessible by two means:
2255 \begin{itemize}
2256 \item \texttt{{\textbackslash}theinformedlist} is a coma-separated list of the informed people's names;
2257 \item \texttt{{\textbackslash}upmdocumentinformedpeople} produces an array of all the informed people (see below for an example).
2258 \end{itemize}
2259
2260 \upmdocumentinformedpeople
2261
2262 \section{Copyright and Publication Information}
2263
2264 Package \texttt{upmethodology-document} provides several commands to define the copyright owner and the publication informations required to generate a publication page.
2265
2266 \subsection{Setting Information}
2267
2268 The Copyright holder(s) are person(s) or institution(s), that own the copyright on the document. The following command allows you to set the identity of the copyright holder in all parts of the documents: \\
2269 \texttt{{\textbackslash}setcopyrighter\{name\}}\\
2270
2271 Publisher is the people or the institution, or both, which is publishing the document. Basically it is the same the copyrighter (see above): \\
2272 \texttt{{\textbackslash}setpublisher\{name\}}\\
2273
2274 Some times, copyright laws depend on the location where the document is printed. The following command allows you to put a message in the publication page which is indicating where the document is printed: \\
2275 \texttt{{\textbackslash}setprintingaddress\{address\}}\\
2276
2277 Publications may be identifier by international identifiers. Package \texttt{upmethodology-document} supports ISBN, ISSN and DOI:
2278 \texttt{{\textbackslash}setisbn\{number\}}\\
2279 \texttt{{\textbackslash}setissn\{number\}}\\
2280 \texttt{{\textbackslash}setdoi\{number\}}\\
2281
2282 The specific text may be provided for explaining the purpose of the document. The text is shown into the copyright page.
2283 In order to change the document's purpose, the following command is provided: \\
2284 \texttt{{\textbackslash}setdocumentpurpose\{text\}}\\
2285
2286
2287 \subsection{Retreiving Information}
2288
2289 The information set by the commands described in the previous section may be retreived with the following commands: \\
2290 \texttt{{\textbackslash}theupmcopyrighter}\\
2291 \texttt{{\textbackslash}theupmpublisher}\\
2292 \texttt{{\textbackslash}theupmprintedin}\\
2293 \texttt{{\textbackslash}theupmisbn}\\
2294 \texttt{{\textbackslash}theupmissn}\\
2295 \texttt{{\textbackslash}theupmdoi}\\
2296
2297 \subsection{Publication Page}
2298
2299 The package \texttt{upmethodology-document} provides the \texttt{{\textbackslash}upmpublicationpage} command which is displaying a empty page with publication informations and optionally set the page number (default value is $-1$). Figure~\ref{fig:publication:page} illustrates the publication page of this document.
2300
2301 \begin{figure}
2302 \begin{center}
2303 \begin{framedminipage}{.8\linewidth}
2304 \upmpublicationminipage % in place of \upmpublicationpage to avoid page number and page style changes
2305 \end{framedminipage}
2306 \caption{Example of Publication Page generated with \texttt{{\textbackslash}upmpublicationpage}}
2307 \label{fig:publication:page}
2308 \end{center}
2309 \end{figure}
2310
2311 \section{Localization}
2312
2313 The current language is defined in the command \texttt{{\textbackslash}upmcurrentlang}.
2314
2315 For testing the current language, you could use the command \texttt{{\textbackslash}ifuplang\{lang\_id\}\{then commands\}\{else commands\}}. This command tests if the given \texttt{lang\_id} corresponds to the value expended by the command \texttt{{\textbackslash}upmcurrentlang}. If it is true, the commands specified in the ``then commands'' are expanded. Otherwise, the commands specified in the ``else commands'' are expanded.
2316
2317 The following commands defines some localized strings used by \texttt{upmethodology-document}:
2318 \begin{itemize}
2319 \item \texttt{{\textbackslash}upm@lang@project}: Project;
2320 \item \texttt{{\textbackslash}upm@lang@document}: Document;
2321 \item \texttt{{\textbackslash}upm@lang@docref}: Reference;
2322 \item \texttt{{\textbackslash}upm@lang@lastupdate}: Last Update;
2323 \item \texttt{{\textbackslash}upm@lang@document@summary}: Document Summary;
2324 \item \texttt{{\textbackslash}upm@lang@document@authors}: Authors;
2325 \item \texttt{{\textbackslash}upm@lang@document@validators}: Validators;
2326 \item \texttt{{\textbackslash}upm@lang@document@names}: Names;
2327 \item \texttt{{\textbackslash}upm@lang@document@emails}: Emails;
2328 \item \texttt{{\textbackslash}upm@lang@document@initials}: Initials;
2329 \item \texttt{{\textbackslash}upm@lang@document@abstract}: Abstract;
2330 \item \texttt{{\textbackslash}upm@lang@document@keywords}: Key-words.
2331 \end{itemize}
2332
2333
2334 %###########################################################
2335
2336 \chapter{Package upmethodology-frontpage}
2337
2338 \begin{center}
2339 \texttt{Version: \VERfp}
2340 \end{center}
2341
2342 The \texttt{upmethodology-frontpage} package provides a front page for the UP documents. This package does not provides any public function. It is based on all the previous packages.
2343
2344 \section{Display the front page}
2345
2346 The front cover is displayed by invoking one of the following commands: \\
2347 \texttt{{\textbackslash}maketitle} \\
2348 \texttt{{\textbackslash}makefrontcover} \\
2349
2350 \section{Change Front Page Layout}
2351
2352 It is possible to change the layout of the front page with the command: \\
2353 \texttt{{\textbackslash}setfrontlayout\{layout\_name\}}\\
2354 where \texttt{layout\_name} must be one of:
2355 \begin{itemize}
2356 \item \texttt{classic}: classic front page layout with title and logo;
2357 \item \texttt{modern}: front page layout with title and logo and background picture.
2358 \end{itemize}
2359
2360 The figure~\figref{frontpage:layout} illustrates the different layouts.
2361
2362 \begin{mfigures}{Front Page Layouts}{frontpage:layout}
2363 \mbox{}\hfill
2364 \msubfigure{width=.45\linewidth}{frontclassic}{\texttt{classic}}
2365 \hfill
2366 \msubfigure{width=.45\linewidth}{frontmodern}{\texttt{modern}}
2367 \hfill\mbox{}
2368 \end{mfigures}
2369
2370 \section{Change Illustration Picture}
2371
2372 It is possible to insert an illustration picture on the front page. You could specify the image with the command: \\
2373 \texttt{{\textbackslash}setfrontillustration[width\_factor]\{filename\}} \\
2374 where:
2375 \begin{itemize}
2376 \item \texttt{width\_factor} is the scaling factor of the picture according to the line width. If you specifies \texttt{1} the image will not be scaled, for \texttt{.5} the image will be the half of its original width...
2377 \item \texttt{filename} is the name of picture to use as the illustration.
2378 \end{itemize}
2379
2380 \section{Define a Front Page in Extensions}
2381
2382 The \texttt{upmethodology-frontpage} package is able to use a page layout defined in a document extension (see chapter~\ref{section:document:extension} for details on document extension).
2383
2384 \pagebreak A \LaTeX\ command must be defined in the \texttt{upmext-NAME.cfg} file of the extension. The name of this command (for example \texttt{mylayout}) must be set with the \texttt{{\textbackslash}set} command in the same file:
2385 \begin{itemize}
2386 \item \texttt{{\textbackslash}Set\{frontpage\}\{mylayout\}} - for defining the entire content of the front page.
2387 \item \texttt{{\textbackslash}Set\{cfrontpage\}\{mycontent\}} - for defining the content of the front page using the white page layout.
2388 \item \texttt{{\textbackslash}Set\{cfrontpage2\}\{mycontent\}} - for defining the content of the second front page using the white page layout. The second page layout is rendered after the first front page.
2389 \end{itemize}
2390
2391 \section{Localization}
2392
2393 The following commands defines some localized strings used by \texttt{upmethodology-frontpage}:
2394 \begin{itemize}
2395 \item \texttt{{\textbackslash}upm@lang@front@authors}: Authors;
2396 \end{itemize}
2397
2398 %###########################################################
2399
2400 \chapter{Package upmethodology-backpage}
2401
2402 \begin{center}
2403 \texttt{Version: \VERbp}
2404 \end{center}
2405
2406 The package \texttt{upmethodology-backpage} provides a back page for the UP documents. This package does not provides any public function. It is based on all the previous packages.
2407
2408 \section{Display the back page}
2409
2410 The back cover is displayed by invoking the following command: \\
2411 \texttt{{\textbackslash}makebackcover} \\
2412
2413 \section{Change Back Page Layout}
2414
2415 It is possible to change the layout of the back page with the command: \\
2416 \texttt{{\textbackslash}setbackcover\{layout\_name\}}\\
2417 where \texttt{layout\_name} must be one of:
2418 \begin{itemize}
2419 \item \texttt{none}: no back page.
2420 \end{itemize}
2421
2422 \section{Small text before the back page}
2423
2424 It is possible to insert a text at the bottom of the page just before the back page (usually the inner page of the cover for a two sided document).
2425 You must set the command \texttt{backcovermessage} with the \texttt{{\textbackslash}Set} command: \\
2426 \texttt{{\textbackslash}Set\{backcovermessage\}\{text\}}\\
2427
2428 \section{Define a Back Page in Extensions}
2429
2430 The \texttt{upmethodology-backpage} package is able to use a page layout defined in a document extension (see chapter~\ref{section:document:extension} for details on document extension).
2431
2432 A \LaTeX\ command must be defined in the \texttt{upmext-NAME.cfg} file of the extension. The name of this command is \texttt{backpage}, and it must be set with the \texttt{{\textbackslash}Set} command in the same file:\\
2433 \texttt{{\textbackslash}Set\{backpage\}\{\TeX\ commands\}}\\
2434
2435
2436 %###########################################################
2437
2438 \chapter{Package upmethodology-extension}\label{section:document:extension}
2439
2440 \begin{center}
2441 \texttt{Version: \VERext}
2442 \end{center}
2443
2444 The package \texttt{upmethodology-extension} provides tools to create layout and rendering extensions.
2445 It is possible to write an extension to the \texttt{upmethodology-document} package. An extension is able to override several values from the default \texttt{upmethodology-}packages or may be used by the other suite's packages. For example, the Systems and Transport laboratory\reffootnote*{foot:setlab} extension is providing laboratory's icons, publisher's name and page layouts.
2446
2447 \section{Load a Document Extension}
2448
2449 To load and use a document extension, you must invoke the command:\\
2450 \texttt{{\textbackslash}UseExtension\{extension\_name\}}\\
2451 where \texttt{extension\_name} is the identifier of the extension to load. The extension's files must be inside your \LaTeX\ search path.
2452
2453 \section{Write a Document Extension}
2454
2455 A document extension could be written and described inside a file named \texttt{upmext-NAME.cfg}, where \texttt{NAME} is the name of the extension. This file must be put in your \LaTeX\ search path.
2456
2457 The \texttt{upmext-NAME.cfg} file is a \LaTeX\ file in which a set of definition commands are put. These commands must respect the \LaTeX\ syntax.
2458
2459 The \texttt{{\textbackslash}DeclareCopyright} command enables you to declare additional copyright information about the extension: \\
2460 \texttt{{\textbackslash}DeclareCopyright{[}lang{]}\{extension\_name\}\{year\}\{copyrighter\}\{trademark and copyright information\}} \\
2461
2462 This command declares the \texttt{copyright} value which contains the copyright text (for this documentation ``\Get{copyright}'').
2463 This command also declares the \texttt{trademarks} value which contains the trademark and other related informations about the extension (for this documentation ``\Get{trademarks}'').
2464
2465 Additional commands are provided to redefine the \texttt{upmethodology-document} constants:\\
2466 \texttt{{\textbackslash}Set{[}lang{]}\{variable\_name\}\{value\}}\\
2467
2468 The \texttt{variable\_name} is the name of the value to override. It must be taken in one of the names listed in table~\tabref{documentextension:names:set}. The \texttt{lang} parameter is a language identifier. It is used to restrict the definition to a specific language. If not given, the default language is used instead. If it is given, the value is set only of the current language corresponds to the given \texttt{lang}. The \texttt{image\_name} and \texttt{image\_scale} are the name of the image file and the scaling factor respectively.
2469
2470 \begin{mtable}{\linewidth}{2}{lX}{List of overiddable value names}{documentextension:names:set}
2471 \hline
2472 \tabularheader{Value Name}{Description}
2473 logo & the filename of the picture which must be used as a large logo. \\
2474 \hline
2475 smalllogo & the filename of the picture which must be used as a small logo. \\
2476 \hline
2477 copyrighter & the name of the authors or the institution which own the copyright on the document. \\
2478 \hline
2479 publisher & the name of the document's publisher. The \texttt{lang} parameter is supported. \\
2480 \hline
2481 printedin & the location/address where this document is printed. \\
2482 \hline
2483 frontillustration & the image to use as illustration. The \texttt{lang} parameter is ignored. \\
2484 \hline
2485 frontpage & the name of the front page style --- not the \LaTeX\ commands --- to layout the front page. \newline OR \newline the front page illustration.\\
2486 \hline
2487 backpage & the \LaTeX\ commands to layout the back page. \newline OR \newline the back page illustration.\\
2488 \hline
2489 cfrontpage & the \LaTeX\ commands --- not the name of the front page style --- to layout the front page.\\
2490 \hline
2491 \end{mtable}
2492
2493 The \texttt{{\textbackslash}SetLangDefault} command allows you to define a value for a specific language. It also change the language-independent value for the given variable name: \\
2494 \texttt{{\textbackslash}SetLangDefault\{language\}\{variable\_name\}\{text\}} \\
2495
2496 The \texttt{{\textbackslash}Get} command allows you to retrieve the value defined by a \texttt{{\textbackslash}Set} for the current language:\\
2497 \texttt{{\textbackslash}Get\{variable\_name\}} \\
2498
2499 The \texttt{{\textbackslash}GetLang} command allows you to retrieve the value defined by a \texttt{{\textbackslash}Set} or \texttt{{\textbackslash}SetLangDefault} for a specific language:\\
2500 \texttt{{\textbackslash}GetLang\{language\}\{variable\_name\}} \\
2501
2502 The \texttt{{\textbackslash}Append} command allows you to append text to an existing definition of a value:\\
2503 \texttt{{\textbackslash}Append\{variable\_name\}\{text to append\}} \\
2504
2505 The \texttt{{\textbackslash}Unset} command allows you to remove the definition of a value:\\
2506 \texttt{{\textbackslash}Unset\{variable\_name\}} \\
2507
2508 The \texttt{{\textbackslash}Ifnotempty} command allows you to expand the \LaTeX\ commands if the given text is not empty:\\
2509 \texttt{{\textbackslash}Ifnotempty\{text\}\{latex\_code\}} \\
2510
2511 The \texttt{{\textbackslash}Ifempty} command allows you to expand the \LaTeX\ commands if the given text is empty:\\
2512 \texttt{{\textbackslash}Ifempty\{text\}\{latex\_code\}} \\
2513
2514 The \texttt{{\textbackslash}Ifelsedefined} command allows you to expand the \LaTeX\ commands in \texttt{then\_code} if a value with the given name was defined, or to expand the \LaTeX\ commands in \texttt{else\_code} if no value with the given name was defined:\\
2515 \texttt{{\textbackslash}Ifelsedefined\{value\_name\}\{then\_code\}\{else\_code\}} \\
2516
2517 The \texttt{{\textbackslash}Put} command is an extension of the standard picture \texttt{{\textbackslash}put} command. It takes into account the joint margin applied in two sided documents when it is used on page's backside (eg. the back page of the document):\\
2518 \texttt{{\textbackslash}Put(x,y)\{commands\}} \\
2519
2520 This command must be used inside a \texttt{picture} environment in place of the standard \texttt{{\textbackslash}put} command.
2521
2522 %###########################################################
2523
2524 \chapter{Package upmethodology-task}
2525
2526 \begin{center}
2527 \texttt{Version: \VERtask}
2528 \end{center}
2529
2530 The \LaTeX\ package \texttt{upmethodology-task} provides a set of commands to define project's tasks.
2531
2532 During \LaTeX\ compilation this package could log the message \texttt{"Project Task(s) may have changed. Rerun to get cross-references right"} when some task information was not found or due to cross-references on them.
2533
2534 \section{Task Definition}
2535
2536 The definition of a task could be made only inside one of the following environments: \\
2537 \texttt{{\textbackslash}begin\{taskdescription\}\{id\}...{\textbackslash}end\{taskdescription\}} \\
2538 \texttt{{\textbackslash}begin\{taskdescription*\}\{id\}...{\textbackslash}end\{taskdescription*\}} \\
2539 where \texttt{id} is the identifier of the task.
2540
2541 The environment \texttt{taskdefinion} displays the task's description with a call to \texttt{{\textbackslash}thetaskdescription\{id\}}. On the other hand, \texttt{taskdefinition*} never displays the task's description.
2542
2543 Inside one of the task's definition environment above, you could use one of the following commands to define the task's attributes:
2544 \begin{itemize}
2545 \item \texttt{{\textbackslash}taskname\{name\}} \\
2546 to define the name of the task;
2547 \item \texttt{{\textbackslash}tasksuper\{id\}} \\
2548 indicates that the current task is a sub-task of the task identified by the given identifier;
2549 \item \texttt{{\textbackslash}taskcomment\{text\}} \\
2550 to describe the task's purposes and goals (will be shown in the description box of the task's description);
2551 \item \texttt{{\textbackslash}taskprogress\{percent\}} \\
2552 to set the percentage for task achievement;
2553 \item \texttt{{\textbackslash}taskstart\{date\}} \\
2554 to set the starting date of the task (real or predicted);
2555 \item \texttt{{\textbackslash}taskend\{date\}} \\
2556 to set the finished date of the task (real or predicted);
2557 \item \texttt{{\textbackslash}taskmanager\{name\}} \\
2558 to add a task's manager into the list of the managers;
2559 \item \texttt{{\textbackslash}taskmember\{name\}} \\
2560 to add a task's member into the list of the members;
2561 \item \texttt{{\textbackslash}taskmilestone\{date\}\{comment\}} \\
2562 to add a milestone into the task for the given date and described by the given comment.
2563 \end{itemize}
2564
2565 \section{Task Reference}
2566
2567 You could reference any information about the defined tasks in your document. In case you used cross-references this package could log the message "\verb+Project Task(s) may have changed. Rerun to get cross-references right+" to complain about rebuilding of our document.
2568
2569 The following commands are available:
2570 \begin{itemize}
2571 \item \texttt{{\textbackslash}thetasksuper\{id\}} \\
2572 replies the identifier of the parent task corresponding to the task identified by \texttt{id};
2573 \item \texttt{{\textbackslash}thetaskname\{id\}} \\
2574 replies the name of the the task identified by \texttt{id};
2575 \item \texttt{{\textbackslash}thetaskcomment\{id\}} \\
2576 replies the description for the the task identified by \texttt{id};
2577 \item \texttt{{\textbackslash}thetaskprogress\{id\}} \\
2578 replies the archieving percent for the the task identified by \texttt{id};
2579 \item \texttt{{\textbackslash}thetaskstart\{id\}} \\
2580 replies the starting date for the the task identified by \texttt{id};
2581 \item \texttt{{\textbackslash}thetaskend\{id\}} \\
2582 replies the ending date for the the task identified by \texttt{id};
2583 \item \texttt{{\textbackslash}thetaskmanagers\{id\}} \\
2584 replies the managers' list for the the task identified by \texttt{id};
2585 \item \texttt{{\textbackslash}thetaskmembers\{id\}} \\
2586 replies the members' list for the the task identified by \texttt{id};
2587 \item \texttt{{\textbackslash}thetaskmilestones\{id\}} \\
2588 replies the list of milestone's dates for the the task identified by \texttt{id};
2589 \item \texttt{{\textbackslash}thetaskmilestonecomment\{id\}\{date\}} \\
2590 replies the comment of the given milestone for the the task identified by \texttt{id};
2591 \item \texttt{{\textbackslash}thetaskdescription[width]\{id\}} \\
2592 replies the complete description of the the task identified by \texttt{id}.
2593 \end{itemize}
2594
2595 \section{Localization}
2596
2597 The following commands defines some localized strings used by \texttt{upmethodology-task}:
2598 \begin{itemize}
2599 \item \texttt{{\textbackslash}upm@task@lang@task}: Task;
2600 \item \texttt{{\textbackslash}upm@task@lang@escription}: Description;
2601 \item \texttt{{\textbackslash}upm@task@lang@startat}: Start at;
2602 \item \texttt{{\textbackslash}upm@task@lang@endat}: End at;
2603 \item \texttt{{\textbackslash}upm@task@lang@archieved}: Achieved;
2604 \item \texttt{{\textbackslash}upm@task@lang@managers}: Managers;
2605 \item \texttt{{\textbackslash}upm@task@lang@members}: Members;
2606 \item \texttt{{\textbackslash}upm@task@lang@Milestones}: Milestones;
2607 \item \texttt{{\textbackslash}upm@task@lang@subtask}: Sub-task of.
2608 \end{itemize}
2609
2610 \section{Example of task}
2611
2612 \begin{taskdescription}{id:tache}
2613 \taskname{nom}
2614 \tasksuper{id:tache:0}
2615
2616 \taskcomment{description}
2617
2618 \taskprogress{percentage}
2619
2620 \taskstart{\makedate{24}{04}{2025}}
2621 \taskend{\makedate{24}{04}{2026}}
2622
2623 \taskmanager{Stephane Galland}
2624 \taskmember{Stephane Galland}
2625
2626 \taskmilestone
2627 {\makedate{24}{07}{2025}}
2628 {Description}
2629 \end{taskdescription}
2630
2631
2632 %###########################################################
2633
2634 \chapter{Package upmethodology-code}
2635
2636 \begin{center}
2637 \texttt{Version: \VERcode}
2638 \end{center}
2639
2640 The \LaTeX\ package \texttt{upmethodology-code} provides a set of commands for source code formatting. The supported source codes are UML, Java and C++.
2641
2642 You could load the package with the following options:
2643 \begin{center}
2644 \begin{tabular}{|>{\ttfamily}l|l|}
2645 \hline
2646 uml & use the UML notation (default value)\\
2647 java & use the Java notation \\
2648 cpp & use the C++ notation \\
2649 \hline
2650 \end{tabular}
2651 \end{center}
2652
2653 You could also change the notation language with the command: \\
2654 \texttt{{\textbackslash}upmcodelang\{upm\string|java\string|cpp\}}
2655
2656 The provided commands are listed in the following table: \\
2657 \begin{tabularx}{\linewidth}{|>{\ttfamily}l|X|X|X|}
2658 \hline
2659 {\normalfont command} & UML & Java & C++ \\
2660 \hline
2661 \multicolumn{4}{|X|}{Prototypes} \\
2662 \hline
2663 {\textbackslash}jclass\{TheClass\} & \upmcodelang{uml}\jclass{TheClass} & \upmcodelang{java}\jclass{TheClass} & \upmcodelang{cpp}\jclass{TheClass} \\
2664 {\textbackslash}jinterface\{TheInterface\} & \upmcodelang{uml}\jinterface{TheInterface} & \upmcodelang{java}\jinterface{TheInterface} & \upmcodelang{cpp}\jinterface{TheInterface} \\
2665 {\textbackslash}jpackage\{ThePackage\} & \upmcodelang{uml}\jpackage{ThePackage} & \upmcodelang{java}\jpackage{ThePackage} & \upmcodelang{cpp}\jpackage{ThePackage} \\
2666 {\textbackslash}jfunc\{FunctionName\} & \upmcodelang{uml}\jfunc{FunctionName} & \upmcodelang{java}\jfunc{FunctionName} & \upmcodelang{cpp}\jfunc{FunctionName} \\
2667 \hline
2668 \multicolumn{4}{|X|}{Types} \\
2669 \hline
2670 {\textbackslash}jclazz & \upmcodelang{uml}\jclazz & \upmcodelang{java}\jclazz & \upmcodelang{cpp}\jclazz \\
2671 {\textbackslash}jvoid & \upmcodelang{uml}\jvoid & \upmcodelang{java}\jvoid & \upmcodelang{cpp}\jvoid \\
2672 {\textbackslash}jboolean & \upmcodelang{uml}\jboolean & \upmcodelang{java}\jboolean & \upmcodelang{cpp}\jboolean \\
2673 {\textbackslash}jint & \upmcodelang{uml}\jint & \upmcodelang{java}\jint & \upmcodelang{cpp}\jint \\
2674 {\textbackslash}jlong & \upmcodelang{uml}\jlong & \upmcodelang{java}\jlong & \upmcodelang{cpp}\jlong \\
2675 {\textbackslash}jfloat & \upmcodelang{uml}\jfloat & \upmcodelang{java}\jfloat & \upmcodelang{cpp}\jfloat \\
2676 {\textbackslash}jdouble & \upmcodelang{uml}\jdouble & \upmcodelang{java}\jdouble & \upmcodelang{cpp}\jdouble \\
2677 {\textbackslash}jchar & \upmcodelang{uml}\jchar & \upmcodelang{java}\jchar & \upmcodelang{cpp}\jchar \\
2678 {\textbackslash}jstring & \upmcodelang{uml}\jstring & \upmcodelang{java}\jstring & \upmcodelang{cpp}\jstring \\
2679 {\textbackslash}jarray\{T\} & \upmcodelang{uml}\jarray{\jclass{T}} & \upmcodelang{java}\jarray{\jclass{T}} & \upmcodelang{cpp}\jarray{\jclass{T}} \\
2680 {\textbackslash}jcollection\{T\} & \upmcodelang{uml}\jcollection{\jclass{T}} & \upmcodelang{java}\jcollection{\jclass{T}} & \upmcodelang{cpp}\jcollection{\jclass{T}} \\
2681 {\textbackslash}jset\{T\} & \upmcodelang{uml}\jset{\jclass{T}} & \upmcodelang{java}\jset{\jclass{T}} & \upmcodelang{cpp}\jset{\jclass{T}} \\
2682 \hline
2683 \end{tabularx}
2684 \newpage
2685 \begin{tabularx}{\linewidth}{|>{\ttfamily}l|X|X|X|}
2686 \hline
2687 {\normalfont command} & UML & Java & C++ \\
2688 \hline
2689 \multicolumn{4}{|X|}{Constants} \\
2690 \hline
2691 {\textbackslash}jtrue & \upmcodelang{uml}\jtrue & \upmcodelang{java}\jtrue & \upmcodelang{cpp}\jtrue \\
2692 {\textbackslash}jfalse & \upmcodelang{uml}\jfalse & \upmcodelang{java}\jfalse & \upmcodelang{cpp}\jfalse \\
2693 \hline
2694 \multicolumn{4}{|X|}{Operations} \\
2695 \hline
2696 {\textbackslash}jcode\{source code\} & \upmcodelang{uml}\jcode{source code} & \upmcodelang{java}\jcode{source code} & \upmcodelang{cpp}\jcode{source code} \\
2697 {\textbackslash}jcall\{fct\}\{params\} & \upmcodelang{uml}\jcall{fct}{params} & \upmcodelang{java}\jcall{fct}{params} & \upmcodelang{cpp}\jcall{fct}{params} \\
2698 {\textbackslash}jop\{operator\} & \upmcodelang{uml}\jop{operator} & \upmcodelang{java}\jop{operator} & \upmcodelang{cpp}\jop{operator} \\
2699 \hline
2700 \end{tabularx}
2701
2702 %###########################################################
2703
2704 %\chapter{Package upmethodology-spec}
2705
2706 %\begin{center}
2707 % \texttt{Version: \VERspec}
2708 %\end{center}
2709
2710 %The \LaTeX\ package \texttt{upmethodology-spec} provides a set of commands for building a specification document.
2711
2712 %\section{Specification Definition}
2713
2714 %The definition of a specification could be made only inside one of the following environments: \\
2715 %\texttt{{\textbackslash}begin\{detailspec\}[width]\{title\}...{\textbackslash}end\{detailspec\}} \\
2716 %\texttt{{\textbackslash}begin\{detailspec*\}[width]\{title\}...{\textbackslash}end\{detailspec*\}} \\
2717 %where \texttt{width} is the width of the specification box on the page, and \texttt{title} is the title of the specification box.
2718
2719 %The environment \texttt{specdetail} displays the detailed description and uses a more complex rendering. On the other hand, \texttt{specdetail*} never displays the description and uses a simpler rendering.
2720
2721 %\section{Components of a Specification}
2722
2723 %A specification has several components that may be defined by the commands in the following table:
2724 %\begin{tabularx}{\linewidth}{|>{\ttfamily}l|X|}
2725 % \hline
2726 % {\normalfont Command} & Description \\
2727 % \hline\hline
2728 % {\textbackslash}specfunc[modifiers]\{return type\}\{name\}\{parameters\} & \\
2729 % \hline
2730 % {\textbackslash}speccons[modifiers]\{name\}\{parameters\} & \\
2731 % \hline
2732 % {\textbackslash}specget[modifiers]\{return type\}\{name\} & \\
2733 % \hline
2734 % {\textbackslash}specset[modifiers]\{return type\}\{name\} & \\
2735 % \hline\hline
2736 % {\textbackslash}specparam[in|inout|out]\{name\}\{description\} & \\
2737 % \hline\hline
2738 % {\textbackslash}specreturn[modifiers]\{description\} & \\
2739 % \hline
2740 % {\textbackslash}specglobalreturn[modifiers]\{description\} & \\
2741 % \hline\hline
2742 % {\textbackslash}specstarthline & \\
2743 % \hline
2744 % {\textbackslash}specendhline & \\
2745 % \hline
2746 %\end{tabularx}
2747
2748 %\section{Examples of Specifications}
2749
2750 %\subsection{Description of the specification}
2751
2752 %Let consider a specification with a description:
2753 %\begin{verbatim}
2754 %\begin{detailspec}{Example 1}
2755 % This is a description.
2756 %\end{detailspec}
2757 %\end{verbatim}
2758
2759 %The previous \LaTeX\ code generates the following figure:
2760 %\begin{detailspec}{Example 1}
2761 % This is a description.
2762 %\end{detailspec}
2763
2764 %\subsection{Returned Values}
2765
2766 %Let add into the previous example the specification of returned values:
2767 %\begin{verbatim}
2768 %\begin{detailspec}{Example 2}
2769 % This is a description.
2770 % \specreturn{description of a first returned value}
2771 % \specreturn{description of a second returned value}
2772 %\end{detailspec}
2773 %\end{verbatim}
2774
2775 %The previous \LaTeX\ code generates the following figure:
2776 %\begin{detailspec}{Example 2}
2777 %% This is a description.
2778 %% \specreturn{description of a first returned value}
2779 %% \specreturn{description of a second returned value}
2780 %\end{detailspec}
2781
2782 %###########################################################
2783
2784 \chapter{Authors and License}
2785
2786 Copyright \copyright\ \upmcopyrightdate\ \makename{St\'ephane}{Galland}
2787
2788 \vspace{.5cm}
2789
2790 This program is free library; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version.
2791
2792 \vspace{.5cm}
2793
2794 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
2795
2796 \vspace{.5cm}
2797
2798 You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
2799 Boston, MA 02111-1307, USA.
2800
2801 \end{document}