summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ulthese
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-20 23:17:55 +0000
committerKarl Berry <karl@freefriends.org>2014-01-20 23:17:55 +0000
commit2b5c60ccb1ed42479efd6b30e140b111770e7114 (patch)
tree3f3daa99c278d9dbb32508cf15701e8419f68525 /Master/texmf-dist/tex/latex/ulthese
parentc4fc9d799a82b2e62e2c7982a6e461d3a7fea717 (diff)
ulthese (20jan14)
git-svn-id: svn://tug.org/texlive/trunk@32738 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ulthese')
-rw-r--r--Master/texmf-dist/tex/latex/ulthese/ulthese.cls218
1 files changed, 129 insertions, 89 deletions
diff --git a/Master/texmf-dist/tex/latex/ulthese/ulthese.cls b/Master/texmf-dist/tex/latex/ulthese/ulthese.cls
index e1bb1dd14f5..69811766116 100644
--- a/Master/texmf-dist/tex/latex/ulthese/ulthese.cls
+++ b/Master/texmf-dist/tex/latex/ulthese/ulthese.cls
@@ -30,11 +30,15 @@
%%
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesClass{ulthese}%
- [2013/01/16 v2.1 Classe pour les theses et memoires de l'Universite Laval]
+ [2014/01/20 v3.0 Classe pour les theses et memoires de l'Universite Laval]
\RequirePackage{ifthen}
+\RequirePackage{ifxetex}
\newboolean{UL@natbib}
\setboolean{UL@natbib}{true}
\DeclareOption{nonatbib}{\setboolean{UL@natbib}{false}}
+\newboolean{UL@babel}
+\setboolean{UL@babel}{true}
+\DeclareOption{nobabel}{\setboolean{UL@babel}{false}}
\newcommand*{\UL@ptsize}{}
\DeclareOption{10pt}{%
\PassOptionsToClass{10pt}{memoir}
@@ -45,14 +49,100 @@
\DeclareOption{12pt}{%
\PassOptionsToClass{12pt}{memoir}
\renewcommand*{\UL@ptsize}{12}}
+\newboolean{UL@isprogmasc}
+\newcommand*{\UL@typenum}{}
+\DeclareOption{LLD}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{true}
+ \newcommand*{\UL@typeofdoc}{Th\`ese}
+ \newcommand*{\UL@degree}{Docteur en droit (L.L.D.)}}
+\DeclareOption{DPsy}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{true}
+ \newcommand*{\UL@typeofdoc}{Th\`ese}
+ \newcommand*{\UL@degree}{Docteur en psychologie (D.Psy.)}}
+\DeclareOption{DThP}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{true}
+ \newcommand*{\UL@typeofdoc}{Th\`ese}
+ \newcommand*{\UL@degree}{Docteur en th\'eologie pratique (D.Th.P.)}}
+\DeclareOption{PhD}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{true}
+ \newcommand*{\UL@typeofdoc}{Th\`ese}
+ \newcommand*{\UL@degree}{Philosophi{\ae} doctor (Ph.D.)}}
+\DeclareOption{LLM}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{false}
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+ \newcommand*{\UL@degree}{Ma\^itre en droit (L.L.M.)}}
+\DeclareOption{MA}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{false}
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+ \newcommand*{\UL@degree}{Ma\^itre \`es arts (M.A.)}}
+\DeclareOption{MMus}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{false}
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+ \newcommand*{\UL@degree}{Ma\^itre en musique (M.Mus.)}}
+\DeclareOption{MSc}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{false}
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+ \newcommand*{\UL@degree}{Ma\^itre \`es sciences (M.Sc.)}}
+\DeclareOption{MServSoc}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{false}
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+ \newcommand*{\UL@degree}{Ma\^itre en service social (M.Serv.Soc.)}}
+\DeclareOption{MScGeogr}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{false}
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+ \newcommand*{\UL@degree}{Ma\^itre en sciences g\'eographiques (M.Sc.G\'eogr.)}}
+\DeclareOption{MATDR}{%
+ \renewcommand*{\UL@typenum}{0}
+ \setboolean{UL@isprogmasc}{false}
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+ \newcommand*{\UL@degree}{Ma\^itre en am\'enagement du territoire et d\'eveloppement r\'egional (M.ATDR)}}
+\DeclareOption{multifacultaire}{%
+ \renewcommand*{\UL@typenum}{1}}
+\DeclareOption{cotutelle}{%
+ \renewcommand*{\UL@typenum}{2}
+ \protected@edef\UL@typeofdoc{\UL@typeofdoc\ en cotutelle}}
+\DeclareOption{extensionUdeS}{%
+ \renewcommand*{\UL@typenum}{3}
+ \newcommand*{\UL@extensionat}{Universit\'e de Sherbrooke}
+ \newcommand*{\UL@extensionloc}{Sherbrooke, Qu\'ebec}}
+\DeclareOption{extensionUQO}{%
+ \renewcommand*{\UL@typenum}{3}
+ \newcommand*{\UL@extensionat}{Universit\'e du Qu\'ebec en Outaouais}
+ \newcommand*{\UL@extensionloc}{Gatineau, Qu\'ebec}}
+\DeclareOption{extensionUQAC}{%
+ \renewcommand*{\UL@typenum}{3}
+ \newcommand*{\UL@extensionat}{Universit\'e du Qu\'ebec \`a Chicoutimi}
+ \newcommand*{\UL@extensionloc}{Chicoutimi, Qu\'ebec}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ExecuteOptions{11pt,letterpaper}
\ProcessOptions
+\ifx\UL@typenum\empty
+ \ClassError{ulthese}{%
+ No thesis type specified.}
+ {Declare the thesis type as a class option.}
+\fi
\LoadClass[twoside,openright]{memoir}
-\RequirePackage[T1]{fontenc}
+\ifxetex
+ \RequirePackage{fontspec}
+ \RequirePackage{unicode-math}
+ \defaultfontfeatures{Ligatures=TeX}
+\else
+ \RequirePackage[T1]{fontenc}
+\fi
\ifthenelse{\boolean{UL@natbib}}{\RequirePackage{natbib}}{}
-\RequirePackage{babel}
-\RequirePackage[autolanguage]{numprint}
+\ifthenelse{\boolean{UL@babel}}{%
+ \RequirePackage{babel}
+ \RequirePackage[autolanguage]{numprint}}{}
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{textcomp}
@@ -62,6 +152,8 @@
\checkandfixthelayout[nearest]
\setlength{\footskip}{\lowermargin}
\addtolength{\footskip}{-10mm}
+\renewcommand{\@pnumwidth}{3em}
+\renewcommand{\@tocrmarg}{4em}
\OnehalfSpacing
\setlength{\parskip}{0.5\baselineskip}
\setlength{\parindent}{0em}
@@ -73,7 +165,7 @@
\makeoddfoot{ul}{}{}{\thepage}
\aliaspagestyle{plain}{ul}
\pagestyle{ul}
-\newcommand*{\UL@phvfamily}{\fontfamily{phv}\selectfont}
+\newcommand*{\UL@phvfamily}{\fontencoding{T1}\fontfamily{phv}\selectfont}
\ifnum\UL@ptsize=10\relax
\newcommand*{\UL@fonttitle}{\normalfont\huge\bfseries\UL@phvfamily}
\newcommand*{\UL@fontsubtitle}{\normalfont\LARGE\bfseries\UL@phvfamily}
@@ -95,21 +187,16 @@
\newcommand*{\UL@fontprogram}{\UL@fontauthor}
\newcommand*{\UL@fontbase}{\normalfont\normalsize\UL@phvfamily}
\fi
-\newboolean{UL@hassubtitle}
-\newboolean{UL@isprogmasc}
\newcommand{\UL@maintitle}{}
\newcommand{\UL@subtitle}{}
\newcommand*{\UL@author}{}
\newcommand*{\UL@program}{}
\newcommand*{\UL@year}{}
-\newcommand*{\UL@typeofdoc}{}
-\newcommand*{\UL@degree}{}
\newcommand*{\UL@nameother}{}
\newcommand*{\UL@degreeother}{}
\newcommand*{\UL@facUL}{}
\newcommand*{\UL@facother}{}
-\newcommand*{\UL@extensionat}{}
-\newcommand*{\UL@extensionloc}{}
+\newboolean{UL@hassubtitle}
\newcommand{\titre}[1]{\renewcommand{\UL@maintitle}{#1}}
\newcommand{\soustitre}[1]{%
\setboolean{UL@hassubtitle}{true}
@@ -117,79 +204,8 @@
\newcommand*{\auteur}[1]{\renewcommand*{\UL@author}{#1}}
\newcommand*{\annee}[1]{\renewcommand*{\UL@year}{#1}}
\newcommand*{\programme}[1]{\renewcommand*{\UL@program}{#1}}
-\newcommand*{\LLD}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \renewcommand*{\UL@typeofdoc}{Th\`ese}
- \renewcommand*{\UL@degree}{Docteur en droit (L.L.D.)}}
-\newcommand*{\DPsy}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \renewcommand*{\UL@typeofdoc}{Th\`ese}
- \renewcommand*{\UL@degree}{Docteur en psychologie (D.Psy.)}}
-\newcommand*{\DThP}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \renewcommand*{\UL@typeofdoc}{Th\`ese}
- \renewcommand*{\UL@degree}{Docteur en th\'eologie pratique (D.Th.P.)}}
-\newcommand*{\PhD}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \renewcommand*{\UL@typeofdoc}{Th\`ese}
- \renewcommand*{\UL@degree}{Philosophi{\ae} doctor (Ph.D.)}}
-\newcommand*{\LLM}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \renewcommand*{\UL@typeofdoc}{M\'emoire}
- \renewcommand*{\UL@degree}{Ma\^itre en droit (L.L.M.)}}
-\newcommand*{\MA}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \renewcommand*{\UL@typeofdoc}{M\'emoire}
- \renewcommand*{\UL@degree}{Ma\^itre \`es arts (M.A.)}}
-\newcommand*{\MMus}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \renewcommand*{\UL@typeofdoc}{M\'emoire}
- \renewcommand*{\UL@degree}{Ma\^itre en musique (M.Mus.)}}
-\newcommand*{\MSc}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \renewcommand*{\UL@typeofdoc}{M\'emoire}
- \renewcommand*{\UL@degree}{Ma\^itre \`es sciences (M.Sc.)}}
-\newcommand*{\MServSoc}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \renewcommand*{\UL@typeofdoc}{M\'emoire}
- \renewcommand*{\UL@degree}{Ma\^itre en service social (M.Serv.Soc.)}}
-\newcommand*{\MScGeogr}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \renewcommand*{\UL@typeofdoc}{M\'emoire}
- \renewcommand*{\UL@degree}{Ma\^itre en sciences géographiques (M.Sc.G\'eogr.)}}
-\newcommand*{\MATDR}{%
- \newcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \renewcommand*{\UL@typeofdoc}{M\'emoire}
- \renewcommand*{\UL@degree}{Ma\^itre en am\'enagement du territoire et d\'eveloppement r\'egional (M.ATDR)}}
-\newcommand*{\multifacultaire}{\renewcommand*{\UL@typenum}{1}}
-\newcommand*{\cotutelle}{%
- \renewcommand*{\UL@typenum}{2}
- \edef\UL@typeofdoc{\UL@typeofdoc\ en cotutelle}}
\newcommand*{\univcotutelle}[1]{\renewcommand*{\UL@nameother}{#1}}
\newcommand*{\gradecotutelle}[1]{\renewcommand*{\UL@degreeother}{#1}}
-\newcommand*{\extensionUdeS}{%
- \renewcommand*{\UL@typenum}{3}
- \renewcommand*{\UL@extensionat}{Universit\'e de Sherbrooke}
- \renewcommand*{\UL@extensionloc}{Sherbrooke, Qu\'ebec}}
-\newcommand*{\extensionUQO}{%
- \renewcommand*{\UL@typenum}{3}
- \renewcommand*{\UL@extensionat}{Universit\'e du Qu\'ebec en Outaouais}
- \renewcommand*{\UL@extensionloc}{Gatineau, Qu\'ebec}}
-\newcommand*{\extensionUQAC}{%
- \renewcommand*{\UL@typenum}{3}
- \renewcommand*{\UL@extensionat}{Universit\'e du Qu\'ebec \`a Chicoutimi}
- \renewcommand*{\UL@extensionloc}{Chicoutimi, Qu\'ebec}}
\newcommand{\faculteUL}[1]{\renewcommand*{\UL@facUL}{#1}}
\newcommand*{\faculteUdeS}[1]{\renewcommand*{\UL@facother}{#1}}
\newcommand*{\faculteUQO}[1]{\renewcommand*{\UL@facother}{#1}}
@@ -223,7 +239,11 @@
{\UL@fontprogram\UL@program}\par
\UL@degree\par
\vspace{36pt}
- \UL@facUL\par
+ \ifx\UL@facUL\empty
+ \ClassWarningNoLine{ulthese}{UL faculty names missing.}
+ \else
+ \UL@facUL\par
+ \fi
\vspace{48pt}
Qu\'ebec, Canada\par
\or% 2 cotutelle
@@ -231,8 +251,16 @@
Universit\'e Laval\par Qu\'ebec, Canada\par
\UL@degree\par
\vspace{\baselineskip} et\par \vspace{\baselineskip}
- \UL@nameother\par
- \UL@degreeother\par
+ \ifx\UL@nameother\empty
+ \ClassWarningNoLine{ulthese}{Other university name and location missing}
+ \else
+ \UL@nameother\par
+ \fi
+ \ifx\UL@degreeother\empty
+ \ClassWarningNoLine{ulthese}{Other university degree missing}
+ \else
+ \UL@degreeother\par
+ \fi
\or% 3 extension
\vspace{48pt}
{\UL@fontprogram\UL@program\ de l'Universit\'e Laval\par
@@ -241,9 +269,20 @@
\vspace{36pt}
\UL@degree\par
\vspace{36pt}
- \UL@facother\par \UL@extensionat\par \UL@extensionloc\par
+ \ifx\UL@facother\empty
+ \ClassWarningNoLine{ulthese}{Other university faculty name missing}
+ \else
+ \UL@facother\par
+ \fi
+ \UL@extensionat\par
+ \UL@extensionloc\par
\vspace{\baselineskip}
- \UL@facUL\par Universit\'e Laval\par Qu\'ebec, Canada\par
+ \ifx\UL@facUL\empty
+ \ClassWarningNoLine{ulthese}{UL faculty name missing}
+ \else
+ \UL@facUL\par
+ \fi
+ Universit\'e Laval\par Qu\'ebec, Canada\par
\fi}
\newlength{\UL@docidspacing}
\setlength{\UL@docidspacing}{82pt}
@@ -265,7 +304,7 @@
\ifnum\UL@typenum>1\relax
\vspace*{0pt}\par
\else
- \includegraphics[height=40px,keepaspectratio=true]{ul_p}\par
+ \includegraphics[height=15mm,keepaspectratio=true]{ul_p}\par
\fi
\vspace{82pt}
\box\UL@titlebox
@@ -278,7 +317,8 @@
\vfill
{\textcopyright} \UL@author, \UL@year\par
\cleardoublepage}}
-\addto\captionsfrench{\renewcommand{\listfigurename}{Liste des figures}}
+\ifthenelse{\boolean{UL@babel}}{%
+ \addto\captionsfrench{\renewcommand{\listfigurename}{Liste des figures}}}{}
\newcommand{\dedicace}[1]{{%
\clearpage
\pagestyle{empty}