L A TEX document class for Les Cahiers du GERAD series
Benoit Hamel
∗Karine Hébert
†‡April 25, 2022
Contents
1 Installing the class 3
1.1 Prerequisites . . . 3
1.2 Installation . . . 3
2 Using the class 4 2.1 Options . . . 4
2.2 Using packages . . . 5
2.2.1 babel . . . 5
2.2.2 algorithm, algorithmic, algorithm2e . . . 5
2.2.3 float . . . 6
2.2.4 cleveref . . . 7
2.3 Commands . . . 7
2.3.1 Metadata . . . 7
2.3.2 Document Layout . . . 8
2.4 Environments . . . 8
2.4.1 Title page . . . 8
2.4.2 Abstracts section . . . 9
∗Library, HEC Montréal
†GERAD, HEC Montréal
3 The geradwp.tex template 9
3.1 Default packages (lines 92-106) . . . 10
3.2 Default options (lines 107-136) . . . 10
3.3 Author commands (lines 137-145). . . 10
3.4 Metadata (lines 147-183). . . 10
3.5 Abstracts, keywords, acknowledgements, article (starting at line 185) 10 A Class source code 10 A.1 Tests and boolean values. . . 11
A.2 Class options . . . 11
A.3 Loading the class . . . 12
A.4 Defaut packages and their options . . . 12
A.5 Formatting . . . 13
A.6 Private class commands . . . 16
A.6.1 Metadata . . . 16
A.6.2 Cover and title pages. . . 16
A.7 Public class commands and environments . . . 25
A.7.1 Document layout . . . 25
A.7.2 Metadata . . . 25
A.7.3 Document subdivisions . . . 26
A.8 Deprecated commands and environments. . . 29
Change History 30
Abstract
Thegeradwp document class was designed to allow researchers who are GERAD members to write their working papers, preprints and technical reports in line with the presentation standards ofLes Cahiers du GERAD working paper series. This class and the associated files replace the template that GERAD initially distributed.
1 Installing the class
1.1 Prerequisites
Using this class assumes you’ve already installed a TEX distribution with an in- tegrated code editor. In designing geradwp, theTeX Live 2020 and 2021 distributions and theTeXstudio editor were used.
If you are using TeXLive or MacTeX and your document compilation is buggy, begin by making sure your installation is up to date before investigating any further.
If you are using theMikTeX distribution, make sure you install the latest versions of the packages indicated inTable 1before using thegeradwpclass.
Users of Overleaf can also use this class by downloading the necessary files from theGERAD website .
geradwp makes use of fancyhdr version 4
Starting atgeradwp version 1.1, version 4 of thefancyhdr is used. This version introduces new commands that are not backwards compatible with version 3. It is available with the 2021 editions of Tex Live and MacTeX, as well as on Overleaf if you use the 2021 version of TeX Live.
If you are using another TEX distribution, please make sure that you have the right version offancyhdr.
1.2 Installation
The.zip archive you downloaded contains these files:
1. geradwp.ins: class installation file;
2. geradwp.dtx: documented source code for the class;
3. geradwp.pdf: the english version of the class’ documentation;
4. geradwp-fr.pdf : the french version of the class’ documentation;
5. README.md: file needed to display the class description on theCTAN website.
Follow these steps to install the class on your workstation.
1. Create a working directory;
3. open a command line terminal from the directory;
4. enter the following command:
latex geradwp.ins
This command will create the geradwp.cls class file and the geradwp.tex template from which you can draft your working paper.
2 Using the class
Thegeradwpclass is derived from the basicarticle class. You can therefore use all of that class’ functionalities. However, a few of the article class options are defined by default in thegeradwpclass and cannot be modified:
• The font size is10pt;
• the paper size isletterpaper;
• printing is one-sided only (oneside) for thegdwebandgdplainversions of the template;
• printing is two-sided (twoside) for thegdpaperversion of the template.
Since these options are defined in the class file, there is no risk of you deleting them from the template’sdocumentclasscommand. Just make sure not to enter any options that might conflict with the above-mentioned options.
2.1 Options
In addition to the options available via thearticleclass, there are a few options available forgeradwp.
The Web version of a paper that is to be posted on the GERAD website. The gdweb
onesideoption is passed on to thearticleclass.
The paper version of an article that is to be printed and placed in the GERAD gdpaper
documentation centre. Thetwosideoption is passed on to the article class.
The unformatted version of a paper, similar to a basic LATEX article, that is gdplain
to be distributed by the author. Theoneside option is passed on to the article class.
When a paper is revised by the authors, this option is used to display the gdrevised
revision date on the paper’s cover page.
During the drafting and revision process, a 5 ptoverfullruleis printed in the gdfinal
right-hand margin to indicate any parts of the paper that go outside the margin.
Once these two processes are done, this option is used to remove the document’s overfullrule.
Some packages have fun at our expense by modifying the paper’s header. The gdsmallhead
gdsmallheadoption corrects this by resetting the proper header.
Once a paper’s content is published by a publisher, the paper must be updated gdpostpub
to show the new publication’s information on the cover page. The gdpostpub option swaps out the Cahier’s citation for the publisher’s official one and the article URL for theCahier’s
When authors want to add extra research data or an important “appendix”
gdsupplement
to their working paper without including it in the main document, they can write that extra material in a blankgeradwp template with the gdsupplement option included. Combined with the\GDsupplementname command (seesubsub- section 2.3.1), this option will clearly show the supplement name on the title pages and page headers.
Authors sometimes create tables so large that they extend beyond the margins.
gdminitabs
To solve this issue, the gdminitabs option can be used to set the tables in the document tofootnotesize.
2.2 Using packages
Since the goal of this class is to make sure that working papers use a consistent layout, very few packages are preloaded. Table 1 lists those that are preloaded, along with the files where you will find them (and their options, where applicable).
Researchers can choose to use whichever packages they will need, taking into account their features (see below). Care should be taken not to reload any of them or to change any of the default options.
2.2.1 babel
The person maintaining the original template advised the author of this document class that using babel with the template causes a number of problems, soplease do not use the babel package with this new template, until these issues have been fixed. A future release of the class may allow you to use it.
2.2.2 algorithm, algorithmic, algorithm2e
algorithm, algorithmic andalgorithm2e are three different packages,
Package Class file Template Options
amssymb Ë
amsmath Ë
amsfonts Ë
latexsym Ë
graphicx Ë graphicspath=Figures
mathrsfs Ë
geometry Ë
fancyhdr Ë
booktabs Ë
multirow Ë
array Ë
caption Ë font={footnotesize,bf,sf}
xcolor Ë
enumitem Ë
float Ë
algorithm Ë
algorithmic Ë
algorithm2e Ë
hyperref Ë colorlinks
citecolor={blue}
urlcolor={blue}
breaklinks={true}
Table 1: List of the class’ preloaded packages along with their location and options and loaded in the preamble of the template. Simply comment out those that will not be used. Bear in mind thatalgorithmandalgorithmicmust be loaded togetheras they don’t work independently. algorithm2e, on the other hand, il self-sufficient.
algorithmandalgorithm2eare mutually exclusive and cannot be both loaded at once without causing bugs.
Finally, when using the algorithm and algorithmic duo, please put your algorithms’\captionin \footnotesize.
2.2.3 float
Thefloatpackage is loaded with the classonly when thegdminitabs option is enabled. When loaded, it resizes the tables infootnotesize. If you need this package even if your tables are reasonably small, you can load it in the preamble of the document.
If you are using the algorithmpackage, please note that it loads float, so there is no need to load it in the preamble.
2.2.4 cleveref
The template already includes theamsthm package to allow referencing of theo- rems. However, in order for them to appear when using the cleverefpackage,
\newtheoremdefinitions must be placedafterthecleverefpackage is loaded (as specified in Section 14.1 of thecleveref package documentation ).
2.3 Commands
The handful of public commands that were created for this class have two purposes:
document layout and filling in metadata for the working paper.
2.3.1 Metadata
All located in the preamble, the metadata commands allow authors and the GERAD team to insert the bibliographical data that will be found on the cover and title pages of the paper.
Title of the working paper. The title is on both the cover and title pages.
\GDtitle
List of authors, formatted as[First initial]. [Last name] (e.g.: B. Hamel, K.
\GDauthorsShort
Hébert). The contents of this command will be found on the title page, under the title.
List of the authors’ last names for the authors’ copyright notice at the bottom
\GDauthorsCopyright
of the title page.
Publication month of the working paper in both French and English. The
\GDmonth
month for the French version is in the first set of curly brackets and the English one in the second.
The year the paper was published, formatted as YYYY.
\GDyear
Number assigned to the working paper by the GERAD team.
\GDnumber
When a working paper is revised by its authors, this command is used to
\GDrevised
display the revision date on the cover page.
If you write extra research data or an appendix using thegeradwptemplate and
\GDsupplementname
thegdsupplementoption (seesubsection 2.1), the\GDsupplementnamecommand will serve as place holder for the supplement’s name and the class will output it on the title pages and on page headers.
When the working paper is officially published, the GERAD team will replace
\GDpostpubcitation
theCahier’s citation with the official journal citation and replace the link to the GERAD website with the URL from the publisher. The citation must be placed in the first set of curly brackets and the URL in the second.
2.3.2 Document Layout
To keep the template from getting cluttered and to keep authors from deleting critical formatting commands, commands were created to mark each subdivision of the document.
The entire cover page is generated with this command. It is largely format-
\GDcoverpage
ted with the formatting commands listed in subsubsection 2.3.1. The title page that follows the cover is generated by theGDtitlepage environment described in subsection 2.4.
This command marks the beginning of the “content” section, beginning with
\GDabstracts
the English and French abstracts. It configures the page headers and footers, which are used throughout the paper, including the metadata described in subsubsec- tion 2.3.1. The abstracts are written in theGDabstractenvironment described in subsection 2.4.
The working paper begins with this command. It handles some final fine-tuning
\GDarticlestart
of the formatting settings.
2.4 Environments
A few environments were created to quickly format the title page and the abstracts section.
2.4.1 Title page
The entire title page is generated via this environment. To create the page, authors GDtitlepage
only need to type their personal information in theGDauthlist,GDaffillist, and GDemaillistenvironments described below.
TheGDauthlistenvironment is a customized list in which the authors enter GDauthlist
\GDauthitem
\GDrefsep
their full name using the\GDauthitem command (NB: one author per line). The authors can link their affiliations with the \ref{} command, as demonstrated in Source Code 1. In the event that an author has more than one affiliation, they must use one\ref{} command per affiliation, separating each one with a
\GDrefsepcommand.
Source Code 1: Authors list example
1 \ b e g i n { G D a u t h l i s t }
2 \ G D a u t h i t e m { B e n o i t H a m e l \ ref { a f f i l : hec }}
3 \ G D a u t h i t e m { K a r i n e H \ ’ e b e r t \ ref { a f f i l : g e r a d }\ G D r e f s e p \ ref { a f f i l : hec }}
4 \ end { G D a u t h l i s t }
The GDaffillist environment is a customized list of all the authors’ affil- GDaffillist
\GDaffilitem iations, in no predefined order of importance. Each affiliation is written with a
\GDaffilitemcommand with the label of the affiliation entered between the first set of curly brackets, and the affiliation itself in the second, as shown in Source Code 2.
Source Code 2: Affiliations list example
5 \ b e g i n { G D a f f i l l i s t }
6 \ G D a f f i l i t e m { a f f i l : hec }{ HEC M o n t r \ ’ eal } 7 \ G D a f f i l i t e m { a f f i l : g e r a d }{ G E R A D }
8 \ end { G D a u t h l i s t }
The final customized list created for the title page of a Cahier is the GDemaillist
\GDemailitem GDemaillist environment, where the authors’ email addresses are listed, with one email address per\GDemailitemcommand.
Source Code 3: Email list example
9 \ b e g i n { G D e m a i l l i s t }
10 \ G D e m a i l i t e m { b e n o i t .2. h a m e l @ h e c . ca } 11 \ G D e m a i l i t e m { k a r i n e . h e b e r t @ g e r a d . ca } 12 \ end { G D a u t h l i s t }
2.4.2 Abstracts section
In a GERAD working paper, the French and English abstracts are written in GDabstract
a single paragraph. Even though it would have been simpler to write only one
\paragraphcommand per abstract in the template, the authors of the class chose to use the “environment” format in order to add formatting and remain consistent with the behaviour of the abstract environment.
In a GERAD working paper, the acknowledgements are in a distinct block GDacknowledgements
of text that does not match what the \thanks command yields in terms of for- matting. The authors therefore must write all their acknowledgements in the GDacknowledgements environment, and thegeradwpclass will handle the layout according to the chosen version.
3 The geradwp.tex template
Thegeradwp.textemplate was designed to be as simple as possible and is divided in a way that makes the source code of each paper uniform. Here is a brief presentation of the different sections.
3.1 Default packages (lines 92-106)
All the packages that are not loaded by default in the class (seeTable 1) are loaded in this section. It’s in this section that the choice between the algorithm and algorithm2epackages is made. Also, this is where you should load the packages that tend to malfunction if they are loaded after thehyperrefpackage.
3.2 Default options (lines 107-136)
If the name of your folder containing your paper’s figures is named differently than the default name, or if there are multiple folders with figures in them, this is where you can enter that information.
If you want to add hypersetup options without modifying or removing the default ones, you can do that here.
In all other cases, this section should remain unchanged.
3.3 Author commands (lines 137-145)
This section belongs entirely to the author. This is where all the packages needed for the paper can be loaded, as well as their options.
This is also where customized commands, environments, and theorems can be entered.
3.4 Metadata (lines 147-183)
This section is divided in two: the first is at the end of the preamble, and the second in theGDtitlepageenvironment located at the beginning of the document. This is where all the bibliographical metadata for the paper should be.
3.5 Abstracts, keywords, acknowledgements, article (start- ing at line 185)
These last two sections are, of course, where the body of the article will be.
A Class source code
In this appendix, you will find the source code for thegeradwp class. If you’re interested to see how it’s programmed, or help with debugging or improving the class, this section is for you.
A.1 Tests and boolean values
To do conditional tests, the class uses theifthenpackage. The boolean variables identify which version of the paper to generate, how far in the publication process the paper is and it configures some parts of the formatting. Once the variables have been created, default values are set.
1⟨∗class⟩
2\RequirePackage{ifthen}
3
4% Booleans %
5\newboolean{GD@isWebVersion}
6\newboolean{GD@isPaperVersion}
7\newboolean{GD@isPlainVersion}
8\newboolean{GD@needsSmallHeadSep}
9\newboolean{GD@isFinalImpression}
10\newboolean{GD@isPostPublication}
11\newboolean{GD@isSupplement}
12\newboolean{GD@isRevised}
13\newboolean{GD@needsminitabs}
14
15\setboolean{GD@isWebVersion}{false}
16\setboolean{GD@isPaperVersion}{true}
17\setboolean{GD@isPlainVersion}{false}
18\setboolean{GD@needsSmallHeadSep}{false}
19\setboolean{GD@isFinalImpression}{false}
20\setboolean{GD@isPostPublication}{false}
21\setboolean{GD@isSupplement}{false}
22\setboolean{GD@isRevised}{false}
23\setboolean{GD@needsminitabs}{false}
A.2 Class options
The few class options are declared here. They essentially change some boolean values and pass some options to thearticleclass.
24
25% Class Options %
26\DeclareOption{gdweb}{%
27\setboolean{GD@isWebVersion}{true}
28\setboolean{GD@isPaperVersion}{false}
29\setboolean{GD@isPlainVersion}{false}
30\PassOptionsToClass{oneside}{article}
31}
32\DeclareOption{gdpaper}{%
33\setboolean{GD@isWebVersion}{false}
34\setboolean{GD@isPaperVersion}{true}
36\PassOptionsToClass{twoside}{article}
37}
38\DeclareOption{gdplain}{%
39\setboolean{GD@isWebVersion}{false}
40\setboolean{GD@isPaperVersion}{false}
41\setboolean{GD@isPlainVersion}{true}
42\PassOptionsToClass{oneside}{article}
43}
44\DeclareOption{gdsmallhead}{%
45\setboolean{GD@needsSmallHeadSep}{true}
46}
47\DeclareOption{gdfinal}{%
48\setboolean{GD@isFinalImpression}{true}
49}
50\DeclareOption{gdpostpub}{%
51\setboolean{GD@isPostPublication}{true}
52}
53\DeclareOption{gdsupplement}{%
54\setboolean{GD@isSupplement}{true}
55}
56\DeclareOption{gdrevised}{%
57\setboolean{GD@isRevised}{true}
58}
59\DeclareOption{gdminitabs}{%
60\setboolean{GD@needsminitabs}{true}
61}
A.3 Loading the class
The class is loaded in the document with all the user-defined or default values.
62
63% Standard Class Loading %
64\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
65\ProcessOptions\relax
66\LoadClass[letterpaper,10pt]{article}
A.4 Defaut packages and their options
Very few packages are loaded with the class in order to allow the user to write with the greatest possible flexibility. The packages that are loaded, however, ensure that all the papers in the collection have consistent formatting.
67
68% Required Packages %
69\RequirePackage{amssymb}
70\RequirePackage{amsmath}
71\RequirePackage{amsthm}
72\RequirePackage{amsfonts}
73\RequirePackage{latexsym}
74\RequirePackage{graphicx}
75\RequirePackage{mathrsfs}
76\RequirePackage{geometry}
77\RequirePackage{fancyhdr}
78\RequirePackage{booktabs}
79\RequirePackage{multirow}
80\RequirePackage{array}
81\RequirePackage[font={footnotesize,bf,sf}]{caption}
82\RequirePackage{xcolor}
83\RequirePackage{enumitem}
84\ifthenelse{\boolean{GD@needsminitabs}}{%
85\RequirePackage{float}
86}{}
87
88% Required Packages Setup %
89\captionsetup[table]{skip=5pt} % caption pkg setup
A.5 Formatting
We begin by defining the lengths of the document. These can change from one version of the paper to another.
90
91% Lengths %
92\newlength{\GD@authitemsep}
93\newlength{\GD@authtopsep}
94\newlength{\GD@affilitemsep}
95\newlength{\GD@affiltopsep}
96\newlength{\GD@titleminipage@hspace}
97\newlength{\GD@coverpage@vspace}
98\ifthenelse{\boolean{GD@isPlainVersion}}{%
99\setlength{\GD@authitemsep}{0pt}
100\setlength{\GD@authtopsep}{12pt}
101\setlength{\GD@affilitemsep}{0pt}
102\setlength{\GD@affiltopsep}{9pt}
103}{%
104\setlength{\GD@authitemsep}{8pt}
105\setlength{\GD@authtopsep}{24pt}
106\setlength{\GD@affilitemsep}{6pt}
107\setlength{\GD@affiltopsep}{9pt}
108}
109\ifthenelse{\boolean{GD@isPaperVersion}}{%
110\setlength{\GD@titleminipage@hspace}{240pt}
111}{}
113\setlength{\GD@titleminipage@hspace}{227pt}
114}{}
We then set up the geometry of the document, which varies from one version to another.
115
116% Geometry %
117\ifthenelse{\boolean{GD@isWebVersion}}{%
118\geometry{tmargin=1.5cm,%
119bmargin=2cm,%
120lmargin=3cm,%
121rmargin=3cm,%
122nofoot,%
123headsep=30pt,%
124includehead}
125}{}
126\ifthenelse{\boolean{GD@isPlainVersion}}{%
127\geometry{tmargin=1.5cm,%
128bmargin=2cm,%
129lmargin=3cm,%
130rmargin=3cm,%
131headsep=30pt,%
132includehead}
133}{}
134\ifthenelse{\boolean{GD@isPaperVersion}}{%
135\geometry{tmargin=1.5cm,%
136bmargin=2cm,%
137lmargin=3cm,%
138rmargin=2cm,%
139nofoot,%
140headsep=30pt,%
141includehead}
142}{}
143\ifthenelse{\boolean{GD@needsSmallHeadSep}}{%
144\headsep=15pt
145}{}
146\parindent=15pt
147\parskip=7pt plus 1pt minus 1pt
148\g@addto@macro\@floatboxreset\centering
149\widowpenalty=10000
150\clubpenalty=10000
151\raggedbottom
152\allowdisplaybreaks
We add a touch of consistency by modifying the section headers, going down the hierarchy all the way down to\paragraph. Among other changes, we assign the font\sffamilyto the headers, theorems, and proof.
153
154% Section headings %
155\renewcommand{\section}{\@startsection {section}{1}{\z@}%
156{-2ex \@plus -1ex \@minus -.2ex}%
157{1ex \@plus.2ex}%
158{\normalfont\Large\sffamily\bfseries}}
159\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
160{-1.25ex\@plus -1ex \@minus -.2ex}%
161{.75ex \@plus .2ex}%
162{\normalfont\large\sffamily\bfseries}}
163\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}%
164{\z@}%
165{-1.25ex\@plus -1ex \@minus -.2ex}%
166{.75ex \@plus .2ex}%
167{\normalfont\normalsize\sffamily\bfseries}}
168\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
169{-1.25ex \@plus 1ex \@minus -.2ex}%
170{-.5em \@plus -.1em}%
171{\normalfont\normalsize\sffamily\bfseries}}
172\setlength{\partopsep}{.5ex \@plus .1ex} %% to reduce spaces
173\def\@listI{\leftmargin\leftmargini %% above, between and under
174\parsep .25ex \@plus .1ex %% lists - itemize
175\topsep .25ex \@plus .1ex %% description - enumerate
176\itemsep \parsep}
177\let\@listi\@listI
178\@listi
We resize oversized tables that extend past the margins.
179
180% Resizing of huge tables %
181\ifthenelse{\boolean{GD@needsminitabs}}{%
182\floatstyle{plaintop}
183\restylefloat{table}
184\let\oldtabular\tabular
185\renewcommand{\tabular}{\footnotesize\oldtabular}
186\let\oldtable\table
187}{}
Finally, we adjust the formatting of the theorems and of theproofenvironment so they are consistent with everything else.
188
189% Theorems and proof layout %
190\newtheoremstyle{gerad}%
191{3pt}% Space above
192{3pt}% Space below
193{}{}%
194{\sffamily\bfseries}% head font
197{}
198\theoremstyle{gerad}
199
200\renewenvironment{proof}[1][\proofname]{\par
201\pushQED{\qed}%
202\normalfont \topsep6\p@\@plus6\p@\relax
203\trivlist
204\item\relax
205{\bfseries\sffamily
206#1\@addpunct{.}}\hspace\labelsep\ignorespaces
207}{%
208\popQED\endtrivlist\@endpefalse
209}
A.6 Private class commands
Private commands play two separate roles: 1) storing and reusing the document’s metadata; 2) isolate large blocks of code to prevent code duplication.
A.6.1 Metadata
The following commands store the metadata in the associated public commands and populate different parts of the paper such as the headers, cover page and title page.
210
211% Class Private Commands %
212% Metadata %
213\newcommand{\gd@year}{}
214\newcommand{\gd@month@fr}{}
215\newcommand{\gd@month@en}{}
216\newcommand{\gd@number}{}
217\newcommand{\gd@title}{}
218\newcommand{\gd@authors@short}{}
219\newcommand{\gd@authors@copyright}{}
220\newcommand{\gd@postpubcitation}{}
221\newcommand{\gd@postpubcitation@url}{}
222\newcommand{\gd@supplementname}{}
223\newcommand{\gd@revised@year}{}
224\newcommand{\gd@revised@month@fr}{}
225\newcommand{\gd@revised@month@en}{}
A.6.2 Cover and title pages
The cover page and the title page change according to the version of the paper being generated and its publication stage. Rather than duplicating code, the
cover and title pages have been separated into sections that are called up with the criteria mentioned above.
The cover page displays in every version of the paper except gdplain. The following commands define its appearance. The bottom part of the page is different if thegdpostpuboption is used.
226
227% Cover page
228\newcommand{\GD@cover}{%
229\ifthenelse{\boolean{GD@isFinalImpression}}{}{%
230\overfullrule=5pt
231}
232
233\pagestyle{empty}
234\begin{titlepage}
235\sffamily
236\ifthenelse{\boolean{GD@needsSmallHeadSep}}{%
237\vspace*{35pt}
238}{}
239
240{\noindent{\large\bfseries Les Cahiers du GERAD}\hfill ISSN:\quad
2410711--2440}
242\ifthenelse{\boolean{GD@isWebVersion}}{%
243
244\vspace*{54pt}
245{\noindent\LARGE\bfseries \gd@title\par} %Title
246\ifthenelse{\boolean{GD@isSupplement}}%
247{{\noindent\LARGE\gd@supplementname\par}}{}
248\vspace*{18pt}
249{\noindent\Large\gd@authors@short\par}
250 251\vfill
252}{}
253
254\ifthenelse{\boolean{GD@isPaperVersion}}{%
255\vspace*{\GD@coverpage@vspace}
256}{}
257\hspace*{\GD@titleminipage@hspace}
258\begin{minipage}[c][5.4cm][c]{7cm}
259{\ifthenelse{\boolean{GD@isWebVersion}}%
260{\GDcover@minipagetable@web}%
261{\GDcover@minipagetable@paper}%
262}
263\end{minipage}
264 265\vfill
266
267\ifthenelse{\boolean{GD@isPostPublication}}{%
269}{%
270\GDcover@bottom@regular
271}
272\end{titlepage}
273}
274
275% Cover page minipage table (web version)
276\newcommand{\GDcover@minipagetable@web}{%
277\begin{tabular}{p{.5cm}|p{5.5cm}}
278& \normalsize G--\gd@year--\gd@number
279\ifthenelse{\boolean{GD@needsminitabs}}%
280{\\*[10pt]}%
281{\\*[8pt]}
282& \normalsize\gd@month@en\ \gd@year
283\ifthenelse{\boolean{GD@isRevised}}{%
284\\
285&\normalsize Revised: \gd@revised@month@en\ \gd@revised@year
286}{}
287\end{tabular}
288}
289
290% Cover page minipage table (paper version)
291\newcommand{\GDcover@minipagetable@paper}{%
292\begin{tabular}{p{.5cm}|p{5.5cm}}
293\multicolumn{2}{p{6.5cm}}{\normalsize\bfseries \gd@title
294\ifthenelse{\boolean{GD@needsminitabs}}%
295{\vspace*{12.5pt}}%
296{\vspace*{10pt}}}\\
297\ifthenelse{\boolean{GD@isSupplement}}%
298{& \gd@supplementname\\*[10pt]}{}
299& \normalsize\gd@authors@short \\ %Initials. Name
300& \ifthenelse{\boolean{GD@needsminitabs}}%
301{\\*[15pt]}%
302{\\*[12pt]}
303& \normalsize G--\gd@year--\gd@number
304\ifthenelse{\boolean{GD@needsminitabs}}%
305{\\*[10pt]}%
306{\\*[8pt]}
307& \normalsize\gd@month@en\ \gd@year
308\ifthenelse{\boolean{GD@isRevised}}{%
309\\
310&\normalsize Revised: \gd@revised@month@en\ \gd@revised@year
311}{}
312\end{tabular}
313}
314
315% Regular cover page bottom
316\newcommand{\GDcover@bottom@regular}{%
317\hrule
318\smallskip
319
320\noindent\begin{minipage}[t][][l]{7.5cm}
321\scriptsize
322La collection \textit{Les Cahiers du GERAD} est constitu\’{e}e des
323travaux de recherche men\’{e}s par nos membres. La plupart de ces
324documents de travail a \’{e}t\’{e} soumis \‘{a} des revues avec
325comit\’{e} de r\’{e}vision. Lorsqu’un document est accept\’{e} et
326publi\’{e}, le pdf original est retir\’{e} si c’est n\’{e}cessaire et
327un lien vers l’article publi\’{e} est ajout\’{e}.\\
328
329\medskip
330\scriptsize
331\textbf{Citation sugg\’{e}r\’{e}e :} \gd@authors@short~(\gd@month@fr\
332\gd@year). \gd@title,
333\ifthenelse{\boolean{GD@isSupplement}}{\gd@supplementname .}{}
334Rapport technique, Les Cahiers du GERAD G--
335\gd@year--\gd@number, GERAD, HEC Montr\’{e}al, Canada.
336\ifthenelse{\boolean{GD@isRevised}}%
337{ Version r\’evis\’ee: \gd@revised@month@fr\ \gd@revised@year}{}\\
338
339\textbf{Avant de citer ce rapport technique,} veuillez visiter notre
340site Web (\url{https://www.gerad.ca/fr/papers/G-\gd@year-\gd@number})
341afin de mettre \‘a jour vos donn\’ees de r\’ef\’erence, s’il a \’et\’e
342publi\’e dans une revue scientifique.\par
343\end{minipage}
344\hfill
345\begin{minipage}[t][][l]{7.5cm}
346\scriptsize
347The series \textit{Les Cahiers du GERAD} consists of working papers
348carried out by our members. Most of these pre-prints have been submitted
349to peer-reviewed journals. When accepted and published, if necessary,
350the original pdf is removed and a link to the published article is
351added.\\ \\
352
353\scriptsize
354\textbf{Suggested citation:} \gd@authors@short~(\gd@month@en\ \gd@year).
355\gd@title,
356\ifthenelse{\boolean{GD@isSupplement}}{\gd@supplementname .}{}
357Technical report, Les Cahiers du GERAD G--\gd@year--\gd@number,
358GERAD, HEC Montr\’{e}al, Canada.
359\ifthenelse{\boolean{GD@isRevised}}%
360{ Revised version: \gd@revised@month@en\ \gd@revised@year}{}\\
361
362\textbf{Before citing this technical report,} please visit our website
363(\url{https://www.gerad.ca/en/papers/G-\gd@year-\gd@number}) to update
364your reference data, if it has been published in a scientific journal.
365\par
366\end{minipage}
369\hrule
370\smallskip
371
372\noindent\begin{minipage}[t][2.1cm][l]{7.5cm}
373\scriptsize
374La publication de ces rapports de recherche est rendue possible gr\^ace
375au soutien de HEC Montr\’eal, Polytechnique Montr\’eal, Universit\’e
376McGill, Universit\’e du Qu\’ebec \‘a Montr\’eal, ainsi que du Fonds de
377recherche du Qu\’ebec -- Nature et technologies.
378
379\medskip
380D\’ep\^ot l\’egal -- Biblioth\‘eque et Archives nationales du Qu\’ebec,
381\gd@year\\
382\phantom{Depot legal} -- Biblioth\‘eque et Archives Canada, \gd@year
383\par
384\end{minipage}
385\hfill
386\begin{minipage}[t][2.1cm][l]{7.5cm}
387\scriptsize
388The publication of these research reports is made possible
389thanks to the support of HEC Montr\’eal, Polytechnique Montr\’eal,
390McGill University, Universit\’e du Qu\’ebec \‘a Montr\’eal, as well as
391the Fonds de recherche du Qu\’ebec -- Nature et technologies.
392
393\medskip
394Legal deposit -- Biblioth\‘eque et Archives nationales du Qu\’ebec,
395\gd@year\\
396\phantom{Legal deposit} -- Library and Archives Canada, \gd@year\par
397\end{minipage}
398 399\hrule
400\smallskip
401
402\noindent
403\begin{minipage}[t][1cm][l]{7.5cm}
404\begin{scriptsize}\raggedleft
405\textbf{GERAD} HEC Montr\’eal
406
4073000, chemin de la C\^ote-Sainte-Catherine
408
409Montr\’eal (Qu\’ebec) Canada H3T 2A7\par
410\end{scriptsize}
411\end{minipage}
412\hspace*{.35cm}\vrule\hfill
413\begin{minipage}[t][1cm][l]{7.5cm}
414\begin{scriptsize}
415\textbf{T\’el.\,: 514 340-6053}
416
417T\’el\’ec.\,: 514 340-5665
418
420
421www.gerad.ca\par
422\end{scriptsize}
423\end{minipage}
424
425\bigskip
426\hrule
427}
428
429% Post-publication cover page bottom
430\newcommand{\GDcover@bottom@postpub}{%
431\hrule
432\smallskip
433
434\noindent
435\begin{minipage}[t][][l]{7.5cm}
436\scriptsize
437La collection \textit{Les Cahiers du GERAD} est constitu\’{e}e des
438travaux de recherche men\’{e}s par nos membres. La plupart de ces
439documents de travail a \’{e}t\’{e} soumis \‘{a} des revues avec comit\’e
440de r\’{e}vision. Lorsqu’un document est accept\’{e} et publi\’{e}, le
441pdf original est retir\’{e} si c’est n\’{e}cessaire et un lien vers
442l’article publi\’{e} est ajout\’{e}.\par
443\end{minipage}
444\hfill
445\begin{minipage}[t][][l]{7.5cm}
446\scriptsize
447The series \textit{Les Cahiers du GERAD} consists of working papers
448carried out by our members. Most of these pre-prints have been submitted
449to peer-reviewed journals. When accepted and published, if necessary,
450the original pdf is removed and a link to the published article is
451added.\par
452\end{minipage}
453
454\noindent
455\begin{minipage}[t][][l]{\textwidth}
456\footnotesize
457\textbf{CITATION ORIGINALE / ORIGINAL CITATION}
458\smallskip
459
460\gd@postpubcitation\ \url{\gd@postpubcitation@url}.
461\end{minipage}
462
463\bigskip
464 465\hrule
466\smallskip
469\scriptsize
470La publication de ces rapports de recherche est rendue possible gr\^ace
471au soutien de HEC Montr\’eal, Polytechnique Montr\’eal, Universit\’e
472McGill, Universit\’e du Qu\’ebec \‘a Montr\’eal, ainsi que du Fonds de
473recherche du Qu\’ebec -- Nature et technologies.
474
475\medskip
476D\’ep\^ot l\’egal -- Biblioth\‘eque et Archives nationales du Qu\’ebec,
477\gd@year\\
478\phantom{Depot legal} -- Biblioth\‘eque et Archives Canada, \gd@year
479\par
480\end{minipage}
481\hfill
482\begin{minipage}[t][2.1cm][l]{7.5cm}
483\scriptsize
484The publication of these research reports is made possible
485thanks to the support of HEC Montr\’eal, Polytechnique Montr\’eal,
486McGill University, Universit\’e du Qu\’ebec \‘a Montr\’eal, as well as
487the Fonds de recherche du Qu\’ebec -- Nature et technologies.
488
489\medskip
490Legal deposit -- Biblioth\‘eque et Archives nationales du Qu\’ebec,
491\gd@year\\
492\phantom{Legal deposit} -- Library and Archives Canada, \gd@year\par
493\end{minipage}
494 495\hrule
496\smallskip
497
498\noindent
499\begin{minipage}[t][1cm][l]{7.5cm}
500\begin{scriptsize}\raggedleft
501\textbf{GERAD} HEC Montr\’eal
502
5033000, chemin de la C\^ote-Sainte-Catherine
504
505Montr\’eal (Qu\’ebec) Canada H3T 2A7\par
506\end{scriptsize}
507\end{minipage}
508\hspace*{.35cm}\vrule\hfill
509\begin{minipage}[t][1cm][l]{7.5cm}
510\begin{scriptsize}
511\textbf{T\’el.\,: 514 340-6053}
512
513T\’el\’ec.\,: 514 340-5665
514
516
517www.gerad.ca\par
518\end{scriptsize}
519\end{minipage}
520
521\bigskip
522\hrule
523}
The title page appears in all versions of the paper, but it varies according to the version. Given that it is contained in theGDtitlepage environment, the internal commands for the title page’s display are divided into two parts: @begin and@end.
524
525% Regular title page
526\newcommand{\GD@titlepage@begin}{%
527\ifthenelse{\boolean{GD@isWebVersion}}{%
528\newpage\clearpage
529}{%
530\ifthenelse{\boolean{GD@isPaperVersion}}{%
531\newpage\cleardoublepage
532}{}
533}
534\parindent=0pt
535\sffamily
536{\LARGE\bfseries \gd@title\par} %Title
537\ifthenelse{\boolean{GD@isSupplement}}%
538{{\LARGE\gd@supplementname\par}
539}{}
540\begin{minipage}[t][10cm][l]{7.5cm}
541\vspace*{55pt}
542}
543
544\newcommand{\GD@titlepage@end}{%
545\vfill
546\end{minipage}
547\vfill
548{\bfseries \gd@month@en\ \gd@year}\\*
549\ifthenelse{\boolean{GD@isRevised}}%
550{Revised: \gd@revised@month@en\ \gd@revised@year \\}%
551{}
552{\bfseries Les Cahiers du GERAD}\\
553{\bfseries G--\gd@year--\gd@number}\\
554{\footnotesize Copyright \copyright\ \gd@year\ GERAD,
555\gd@authors@copyright}
556\vspace*{0.05cm}
557 558\hrule
559\smallskip
560
563\begin{scriptsize}
564Les textes publi\’es dans la s\’erie des rapports de recherche
565\textit{Les Cahiers du GERAD} n’engagent que la responsabilit\’e de
566leurs auteurs. Les auteurs conservent leur droit d’auteur et leurs
567droits moraux sur leurs publications et les utilisateurs s’engagent \‘a
568reconna\^{\i}tre et respecter les exigences l\’{e}gales associ\’{e}es
569\‘{a} ces droits. Ainsi, les utilisateurs:
570\begin {itemize}
571\item Peuvent t\’{e}l\’{e}charger et imprimer une copie de toute
572publication du portail public aux fins d’\’{e}tude ou de recherche
573priv\’{e}e;
574\item Ne peuvent pas distribuer le mat\’{e}riel ou l’utiliser pour une
575activit\’{e} \‘{a} but lucratif ou pour un gain commercial;
576\item Peuvent distribuer gratuitement l’URL identifiant la publication.
577\end{itemize}
578Si vous pensez que ce document enfreint le droit d’auteur, contactez-
579nous en fournissant des d\’etails. Nous supprimerons imm\’{e}diatement
580l’acc\‘es au travail et enqu\^{e}terons sur votre demande.\par
581\end{scriptsize}
582\end{minipage}
583\hfill
584\begin{minipage}[t][][l]{7.5cm}
585\begin{scriptsize}
586The authors are exclusively responsible for the content of their
587research papers published in the series \textit{Les Cahiers du GERAD}.
588Copyright and moral rights for the publications are retained by the
589authors and the users must commit themselves to recognize and abide the
590legal requirements associated with these rights. Thus, users:
591\begin{itemize}
592\item May download and print one copy of any publication from the public
593portal for the purpose of private study or research;
594\item May not further distribute the material or use it for any
595profit-making activity or commercial gain;
596\item May freely distribute the URL identifying the publication.
597\end{itemize}
598If you believe that this document breaches copyright please contact us
599providing details, and we will remove access to the work immediately and
600investigate your claim.\par
601\end{scriptsize}
602\end{minipage}
603
604\thispagestyle{empty}
605\parindent=15pt
606\newpage
607}
608
609% Plain title page
610\newcommand{\GD@plain@titlepage@begin}{%
611\thispagestyle{empty}
612\sffamily
613{\sffamily\LARGE\bfseries\noindent\gd@title\par}
614\ifthenelse{\boolean{GD@isSupplement}}%
615{{\noindent\LARGE\gd@supplementname\par}}{}
616}
617
618\newcommand{\GD@plain@pagetitle@end}{%
619\vspace*{12pt}
620{\noindent\gd@month@en\ \gd@year}
621\ifthenelse{\boolean{GD@isRevised}}%
622{\\ {\noindent Revised: \gd@revised@month@en\ \gd@revised@year}}{}
623\vspace*{30pt}
624}
A.7 Public class commands and environments
The public commands are those that can be directly accessed by the user. They are, however, each linked to a specific part of the paper, and thus cannot be reused or moved.
A.7.1 Document layout
The number of ageradwp template’s possible versions imply that some internal document layout commands must be easily changed via public commands, avail- able in the template’s preamble. This allows more efficient work on the publisher’s side and prevents the multiplication of homemade versions of the class1.
625
626% Layout public commands
627\newcommand{\GDcoverpagewhitespace}[1]{%
628\setlength{\GD@coverpage@vspace}{#1}
629}
A.7.2 Metadata
The following commands are those users use to enter their paper’s bibliograph- ical data. They modify the values of the corresponding private commands (see subsubsection A.6.1).
630
631% Metadata public commands
632\newcommand{\GDyear}[1]{%
633\renewcommand{\gd@year}{#1}
634}
635\newcommand{\GDmonth}[2]{%
636\renewcommand{\gd@month@fr}{#1}
637\renewcommand{\gd@month@en}{#2}
638}
639\newcommand{\GDnumber}[1]{%
640\renewcommand{\gd@number}{#1}
641}
642\newcommand{\GDtitle}[1]{%
643\renewcommand{\gd@title}{#1}
644}
645\newcommand{\GDauthorsShort}[1]{%
646\renewcommand{\gd@authors@short}{#1}
647}
648\newcommand{\GDauthorsCopyright}[1]{%
649\renewcommand{\gd@authors@copyright}{#1}
650}
651\newcommand{\GDpostpubcitation}[2]{%
652\renewcommand{\gd@postpubcitation}{#1}
653\renewcommand{\gd@postpubcitation@url}{#2}
654}
655\newcommand{\GDsupplementname}[1]{%
656\renewcommand{\gd@supplementname}{#1}
657}
658\newcommand{\GDrevised}[3]{%
659\renewcommand{\gd@revised@month@fr}{#1}
660\renewcommand{\gd@revised@month@en}{#2}
661\renewcommand{\gd@revised@year}{#3}
662}
A.7.3 Document subdivisions
Each part of the paper has specific characteristics in terms of geometry and for- matting (headers, footers, etc.). Rather than bloating the template with multiple lines of code, a few commands and environments were created to group them together.
663
664% Cover page
665\newcommand{\GDcoverpage}{%
666\ifthenelse{\boolean{GD@isPlainVersion}}{}{\GD@cover}
667}
668
669% Title page
670\newenvironment{GDtitlepage}{
671\ifthenelse{\boolean{GD@isPlainVersion}}%
672{\GD@plain@titlepage@begin}%
673{\GD@titlepage@begin}
674}{
675\ifthenelse{\boolean{GD@isPlainVersion}}%
676{\GD@plain@pagetitle@end}%
677{\GD@titlepage@end}
678}
679
680% Title page lists and list items
681\newlist{GDauthlist}{itemize}{1}
682\setlist[GDauthlist]{label={},%
683left=0pt .. 0pt,%
684itemsep=\GD@authitemsep,%
685topsep=\GD@authtopsep}
686\newlist{GDaffillist}{enumerate}{1}
687\setlist[GDaffillist]{label=\textsuperscript{\emph{\alph*}},%
688ref=\textsuperscript{\emph{\alph*}},%
689wide,%
690left=0pt .. 1em,%
691itemsep=\GD@affilitemsep,%
692topsep=\GD@affiltopsep}
693\newlist{GDemaillist}{itemize}{1}
694\setlist[GDemaillist]{label={},%
695left=0pt .. 0pt,%
696itemsep=0pt,%
697parsep=0pt}
698\newcommand{\GDrefsep}{\textsuperscript{,\,}}
699\newcommand{\GDauthitem}[1]{%
700\ifthenelse{\boolean{GD@isPlainVersion}}{%
701\item {\sffamily\large\bfseries #1}
702}{%
703\item {\Large\bfseries #1}
704}
705}
706\newcommand{\GDaffilitem}[2]{\item \label{#1}{\itshape #2}}
707\newcommand{\GDemailitem}[1]{\item {\small\ttfamily #1}}
708
709% Abstracts section
710\newcommand{\GDabstracts}{%
711\ifthenelse{\boolean{GD@isPlainVersion}}{}{%
712\setcounter{page}{2}
713\renewcommand{\thepage}{\roman{page}}
714\pagestyle{fancy}
715\fancyhead[LO]{%
716\textcolor{gray}{\sffamily{\,} Les Cahiers du GERAD}\hfill
717\textcolor{gray}{\sffamily G--\gd@year--\gd@number}%
718\ifthenelse{\boolean{GD@isSupplement}}%
719{\textcolor{gray}{\sffamily\ -- \itshape \gd@supplementname}}%
720{} %
721\ifthenelse{\boolean{GD@isRevised}}%
722{\textcolor{gray}{\sffamily\ -- \itshape Revised}}%
723{}\hfill
726}
727\fancyhead[LE]{%
728\textcolor{gray}{\sffamily{\,}\thepage}\hfill
729\textcolor{gray}{\sffamily G--\gd@year--\gd@number}%
730\ifthenelse{\boolean{GD@isSupplement}}%
731{\textcolor{gray}{\sffamily\ -- \itshape \gd@supplementname}}%
732{} %
733\ifthenelse{\boolean{GD@isRevised}}%
734{\textcolor{gray}{\sffamily\ -- \itshape Revised}}%
735{}\hfill
736\textcolor{gray}{\sffamily Les Cahiers du GERAD}
737{\large\strut}\color{gray}{\hrule}
738}
739\fancyhead[C]{}
740\fancyhead[R]{}
741\fancyfoot{}
742\renewcommand{\headrulewidth}{0pt}
743\renewcommand{\footrulewidth}{0pt}
744\rmfamily
745\vspace*{5pt}
746}
747}
748
749% Custom abstract environment
750\newenvironment{GDabstract}[1]{%
751\paragraph{#1 : }
752}{%
753\ifthenelse{\boolean{GD@isPlainVersion}}{}{\vspace*{2cm}}
754}
755
756% Acknowledgements section
757\newenvironment{GDacknowledgements}{%
758\ifthenelse{\boolean{GD@isPlainVersion}}{%
759\paragraph{Acknowledgements: }
760}{%
761\vfill
762\hrule
763\smallskip
764\paragraph{Acknowledgements: }
765}
766}{}
767
768% Article section
769\newcommand{\GDarticlestart}{%
770\ifthenelse{\boolean{GD@isPlainVersion}}{}{%
771\newpage
772\setcounter{page}{1}
773\renewcommand{\thepage}{\arabic{page}}
774\baselineskip=12.5pt
775\rmfamily
776}
777}
A.8 Deprecated commands and environments
Ingeradwpversion 1.1, all commands and environments that had French names have been translated in English for consistency reasons and to make sure that the they could be directly understood by most users.
The French commands and environments are preserved only to ensure back- wards compatibility between version 1.0 of the template and subsequent versions of the class. Once that version of the template stops circulating, everything that is deprecated will be removed from the class.
778
779\newcommand{\GDtitre}[1]{\GDtitle{#1}}
780\newcommand{\GDmois}[2]{\GDmonth{#1}{#2}}
781\newcommand{\GDannee}[1]{\GDyear{#1}}
782\newcommand{\GDnumero}[1]{\GDnumber{#1}}
783\newcommand{\GDauteursCourts}[1]{\GDauthorsShort{#1}}
784\newcommand{\GDauteursCopyright}[1]{\GDauthorsCopyright{#1}}
785\newcommand{\GDpageCouverture}{\GDcoverpage}
786\newenvironment{GDpagetitre}{
787\ifthenelse{\boolean{GD@isPlainVersion}}%
788{\GD@plain@titlepage@begin}%
789{\GD@titlepage@begin}
790}{
791\ifthenelse{\boolean{GD@isPlainVersion}}%
792{\GD@plain@pagetitle@end}%
793{\GD@titlepage@end}
794}
795 796⟨/class⟩
Change History
1.0
General: Initial release . . . 1 1.1
General: Added a warning
concerning fancyhdr 4 . . . 3 Added internal supplement
name command . . . 17 Added isSupplement boolean
and default value . . . 11 Added new cover page vspace
length . . . 14 Added new
GDcoverpagewhitespace command to change cover page vspace . . . 26 Added new gdsupplement option 12 Added new vspace length for
paper version only . . . 17 Added public
GDsupplementname command 26 Added supplement name in
header . . . 27 Added supplement name in
paper cover page minipage . . 17 Added supplement name to title
page . . . 23 Added supplement name to web
version cover page . . . 17
Added the caption footnotesize note . . . 6 Added the fact that algorithm
loads float package . . . 7 Added the Revised prefix . . . . 23 Added vfill for web version only 17 All public commands have been
translated in English . . . 7 Changed color package for xcolor 5 Changed plain title page’s
month for english . . . 23 Corrected the gdminitabs typo . 5 Fixed
GDcover@bottom@postpub . . 17 Included algorithmic package in
documentation . . . 6 Removed nofoot option from
plain geometry . . . 14 Replaced all fancyhdr v3
commands by v4 commands . 27 Translated all commands to
english . . . 17 Updated GERAD URLs in
abstract. . . 2 Updated GERAD URLs in
Prerequisites subsection. . . 3