summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ulthese
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-04 23:48:21 +0000
committerKarl Berry <karl@freefriends.org>2017-06-04 23:48:21 +0000
commit6308a28c98e8070b0e12ca3598864c94cd2d4428 (patch)
tree1945a48c68940b44edd4733ab32ebba09d3976aa /Master/texmf-dist/tex/latex/ulthese
parent7af991c29f681544324e8e1cfbcf107d30df717d (diff)
ulthese (1jun17)
git-svn-id: svn://tug.org/texlive/trunk@44456 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ulthese')
-rw-r--r--Master/texmf-dist/tex/latex/ulthese/ulthese.cls198
1 files changed, 113 insertions, 85 deletions
diff --git a/Master/texmf-dist/tex/latex/ulthese/ulthese.cls b/Master/texmf-dist/tex/latex/ulthese/ulthese.cls
index c442113e7e1..7f738a6da49 100644
--- a/Master/texmf-dist/tex/latex/ulthese/ulthese.cls
+++ b/Master/texmf-dist/tex/latex/ulthese/ulthese.cls
@@ -26,22 +26,24 @@
%% <ulthese-dev@bibl.ulaval.ca>.
%%
%% This work consists of the files ulthese.dtx and ulthese.ins and the
-%% derived files listed in the README file.
+%% derived files listed in the README.md file.
%%
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesClass{ulthese}%
- [2017/03/01 v4.3 Classe pour les theses et memoires de l'Universite Laval]
-\RequirePackage{ifthen}
+ [2017/06/01 v4.4 Universite Laval thesis and memoir class]
\RequirePackage{ifxetex}
-\newboolean{UL@babel} % charger babel ou non
-\newboolean{UL@natbib} % charger natbib ou non
-\newboolean{UL@isprogmasc} % nom de programme masculin ou non
-\newboolean{UL@isexam} % examen de doctorat ou non
-\newboolean{UL@hassubtitle} % document a un sous-titre ou non
-\setboolean{UL@natbib}{true}
-\DeclareOption{nonatbib}{\setboolean{UL@natbib}{false}}
-\setboolean{UL@babel}{true}
-\DeclareOption{nobabel}{\setboolean{UL@babel}{false}}
+\newif\ifUL@babel \UL@babeltrue % charger babel?
+\newif\ifUL@natbib \UL@natbibtrue % charger natbib?
+\newif\ifUL@chapterbib \UL@chapterbibfalse % charger chapterbib?
+\newif\ifUL@sectionbib \UL@sectionbibfalse % option sectionbib de chapterbib?
+\newif\ifUL@isthesis % programme est une thèse?
+\newif\ifUL@iscotutelle \UL@iscotutellefalse % thèse en cotutelle?
+\newif\ifUL@isexam \UL@isexamfalse % examen de doctorat?
+\newif\ifUL@hassubtitle \UL@hassubtitlefalse % document a un sous-titre?
+\DeclareOption{nonatbib}{\UL@natbibfalse}
+\DeclareOption{bibchapitre}{\UL@chapterbibtrue}
+\DeclareOption{bibsection}{\UL@chapterbibtrue\UL@sectionbibtrue}
+\DeclareOption{nobabel}{\UL@babelfalse}
\newcommand*{\UL@ptsize}{}
\DeclareOption{10pt}{%
\PassOptionsToClass{10pt}{memoir}
@@ -54,141 +56,139 @@
\renewcommand*{\UL@ptsize}{12}}
\newcommand*{\UL@typenum}{}
\DeclareOption{LLD}{%
+ \UL@isthesistrue
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \newcommand*{\UL@typeofdoc}{Th\`ese}
\newcommand*{\UL@degree}{Docteur en droit (LL.~D.)}}
\DeclareOption{DMus}{%
+ \UL@isthesistrue
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \newcommand*{\UL@typeofdoc}{Th\`ese}
\newcommand*{\UL@degree}{Docteur en musique (D.~Mus.)}}
\DeclareOption{DPsy}{%
+ \UL@isthesistrue
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \newcommand*{\UL@typeofdoc}{Th\`ese}
\newcommand*{\UL@degree}{Docteur en psychologie (D.~Psy.)}}
\DeclareOption{DThP}{%
+ \UL@isthesistrue
\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}{%
+ \UL@isthesistrue
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{true}
- \newcommand*{\UL@typeofdoc}{Th\`ese}
\newcommand*{\UL@degree}{Philosophi{\ae} doctor (Ph.~D.)}}
\DeclareOption{MATDR}{%
+ \UL@isthesisfalse
\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{MArch}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre en architecture (M.~Arch.)}}
\DeclareOption{MA}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre \`es arts (M.A.)}}
\DeclareOption{LLM}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre en droit (LL.~M.)}}
\DeclareOption{MErg}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre en ergoth\'erapie (M.~Erg.)}}
\DeclareOption{MMus}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre en musique (M.~Mus.)}}
\DeclareOption{MPht}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre en physioth\'erapie (M.~Pht.)}}
\DeclareOption{MSc}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre \`es sciences (M.~Sc.)}}
\DeclareOption{MScGeogr}{%
+ \UL@isthesisfalse
\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{MServSoc}{%
+ \UL@isthesisfalse
\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{MPsEd}{%
+ \UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \setboolean{UL@isprogmasc}{false}
- \newcommand*{\UL@typeofdoc}{M\'emoire}
\newcommand*{\UL@degree}{Ma\^itre en psycho\'education (M.~Ps.~\'ed.)}}
\DeclareOption{multifacultaire}{%
- \ifthenelse{\equal{\UL@typeofdoc}{Th\`ese}}{%
- \renewcommand*{\UL@typenum}{1}}{%
+ \ifUL@isthesis
+ \renewcommand*{\UL@typenum}{1}
+ \else
\ClassError{ulthese}{%
Incompatible option multifacultaire}
- {Use this option with a doctorate degree only.}}}
+ {Use this option with a doctorate degree only.}
+ \fi}
\DeclareOption{cotutelle}{%
- \ifthenelse{\equal{\UL@typeofdoc}{Th\`ese}}{%
+ \ifUL@isthesis
\renewcommand*{\UL@typenum}{2}
- \protected@edef\UL@typeofdoc{\UL@typeofdoc\ en cotutelle}}{%
+ \UL@iscotutelletrue
+ \else
\ClassError{ulthese}{%
Incompatible option cotutelle}
- {Use this option with a doctorate degree only.}}}
+ {Use this option with a doctorate degree only.}
+ \fi}
\DeclareOption{bidiplomation}{%
- \ifthenelse{\equal{\UL@typeofdoc}{M\'emoire}}{%
- \renewcommand*{\UL@typenum}{2}
- \protected@edef\UL@typeofdoc{\UL@typeofdoc}}{%
+ \ifUL@isthesis
\ClassError{ulthese}{%
Incompatible option bidiplomation}
- {Use this option with a master degree only.}}}
+ {Use this option with a master degree only.}
+ \else
+ \renewcommand*{\UL@typenum}{2}
+ \fi}
\DeclareOption{extensionUdeS}{%
- \ifthenelse{\equal{\UL@typeofdoc}{Th\`ese}}{%
+ \ifUL@isthesis
\renewcommand*{\UL@typenum}{3}
+ \newcommand*{\UL@offered}{offert}
\newcommand*{\UL@extensionat}{Universit\'e de Sherbrooke}
- \newcommand*{\UL@extensionloc}{Sherbrooke, Canada}}{%
+ \newcommand*{\UL@extensionloc}{Sherbrooke, Canada}
+ \else
\ClassError{ulthese}{%
Incompatible option extensionUdeS}
- {Use this option with a doctorate degree only.}}}
+ {Use this option with a doctorate degree only.}
+ \fi}
\DeclareOption{extensionUQO}{%
- \ifthenelse{\equal{\UL@typeofdoc}{Th\`ese}}{%
+ \ifUL@isthesis
\renewcommand*{\UL@typenum}{3}
+ \newcommand*{\UL@offered}{offert}
\newcommand*{\UL@extensionat}{Universit\'e du Qu\'ebec en Outaouais}
- \newcommand*{\UL@extensionloc}{Gatineau, Canada}}{%
+ \newcommand*{\UL@extensionloc}{Gatineau, Canada}
+ \else
\ClassError{ulthese}{%
Incompatible option extensionUQO}
- {Use this option with a doctorate degree only.}}}
+ {Use this option with a doctorate degree only.}
+ \fi}
\DeclareOption{extensionUQAC}{%
- \ifthenelse{\equal{\UL@typeofdoc}{M\'emoire}}{%
- \renewcommand*{\UL@typenum}{3}
- \newcommand*{\UL@extensionat}{Universit\'e du Qu\'ebec \`a Chicoutimi}
- \newcommand*{\UL@extensionloc}{Chicoutimi, Canada}}{%
+ \ifUL@isthesis
\ClassError{ulthese}{%
Incompatible option extensionUQAC}
- {Use this option with a master degree only.}}}
-\setboolean{UL@isexam}{false}
+ {Use this option with a master degree only.}
+ \else
+ \renewcommand*{\UL@typenum}{3}
+ \newcommand*{\UL@offered}{offerte}
+ \newcommand*{\UL@extensionat}{Universit\'e du Qu\'ebec \`a Chicoutimi}
+ \newcommand*{\UL@extensionloc}{Chicoutimi, Canada}
+ \fi}
\DeclareOption{examen}{%
- \ifthenelse{\equal{\UL@typeofdoc}{Th\`ese}}{%
- \setboolean{UL@isexam}{true}
- \renewcommand*{\UL@typeofdoc}{Examen de doctorat}}{%
+ \ifUL@isthesis
+ \UL@isexamtrue
+ \else
\ClassError{ulthese}{%
Incompatible option examen}
- {Use this option with a thesis type only.}}}
+ {Use this option with a thesis type only.}
+ \fi}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ExecuteOptions{11pt,letterpaper}
-\ProcessOptions
+\ProcessOptions\relax
\ifx\UL@typenum\empty
\ClassError{ulthese}{%
No thesis type specified}
@@ -202,10 +202,24 @@
\else
\RequirePackage[T1]{fontenc}
\fi
-\ifthenelse{\boolean{UL@natbib}}{\RequirePackage{natbib}}{}
-\ifthenelse{\boolean{UL@babel}}{%
+\ifUL@natbib
+ \ifUL@sectionbib
+ \PassOptionsToPackage{sectionbib}{natbib}
+ \fi
+ \RequirePackage[round,semicolon,authoryear]{natbib}
+\fi
+\ifUL@chapterbib
+ \ifUL@sectionbib
+ \ifUL@natbib\else
+ \PassOptionsToPackage{sectionbib}{chapterbib}
+ \fi
+ \fi
+ \RequirePackage{chapterbib}
+\fi
+\ifUL@babel
\RequirePackage{babel}
- \RequirePackage[autolanguage]{numprint}}{}
+ \RequirePackage[autolanguage]{numprint}
+\fi
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{textcomp}
@@ -264,7 +278,7 @@
\newcommand*{\UL@facother}{}
\newcommand{\titre}[1]{\renewcommand{\UL@maintitle}{#1}}
\newcommand{\soustitre}[1]{%
- \setboolean{UL@hassubtitle}{true}
+ \UL@hassubtitletrue
\renewcommand{\UL@subtitle}{#1}}
\newcommand*{\auteur}[1]{\renewcommand*{\UL@author}{#1}}
\newcommand*{\annee}[1]{\renewcommand*{\UL@year}{#1}}
@@ -288,11 +302,24 @@
\centering\UL@fonttitle\UL@maintitle}
\setlength{\UL@titleboxtotht}{%
\dimexpr\ht\UL@titlebox+\dp\UL@titlebox}
- \ifthenelse{\boolean{UL@hassubtitle}}{%
+ \ifUL@hassubtitle
\setbox\UL@subtitlebox=\vbox{%
\centering\vspace*{0.5\baselineskip}\UL@fontsubtitle\UL@subtitle}
\setlength{\UL@subtitleboxtotht}{%
- \dimexpr\ht\UL@subtitlebox+\dp\UL@subtitlebox}}{}}
+ \dimexpr\ht\UL@subtitlebox+\dp\UL@subtitlebox}
+ \fi}
+\ifUL@isthesis
+ \ifUL@iscotutelle
+ \newcommand*{\UL@typeofdoc}{Th\`ese en cotutelle}
+ \else
+ \newcommand*{\UL@typeofdoc}{Th\`ese}
+ \fi
+\else
+ \newcommand*{\UL@typeofdoc}{M\'emoire}
+\fi
+\ifUL@isexam
+ \renewcommand*{\UL@typeofdoc}{Examen de doctorat}
+\fi
\newcommand{\UL@docid}{%
{\UL@fontprogram\UL@typeofdoc\par
\ifnum\UL@typenum=2 \UL@program\par \fi}}
@@ -333,8 +360,7 @@
\or% 3 extension
\vspace{48pt}
{\UL@fontprogram\UL@program\ de l'Universit\'e Laval\par
- \ifthenelse{\boolean{UL@isprogmasc}}{offert}{offerte}
- en extension \`a l'\UL@extensionat}\par
+ \UL@offered\ en extension \`a l'\UL@extensionat}\par
\vspace{36pt}
\UL@degree\par
\vspace{36pt}
@@ -385,12 +411,12 @@
\UL@details
\vfill
{\textcopyright} \UL@author, \UL@year\par
- \ifthenelse{\boolean{UL@isexam}}{}{%
+ \ifUL@isexam\else
\clearpage
\ifnum\UL@typenum>1\relax
- \vspace*{0pt}\par
+ \vspace*{0pt}\par
\else
- \rule{0mm}{15mm}\par % strut
+ \rule{0mm}{15mm}\par % strut
\fi
\vspace{82pt}
\box\UL@titlebox
@@ -403,13 +429,15 @@
Sous la direction de:\par
\vspace{\baselineskip}
\UL@director\par
- \UL@codirector}
+ \UL@codirector
+ \fi
\clearpage}}
\newcommand{\pagetitre}{
\ClassWarning{ulthese}{Command \protect\pagetitre\space is obsolete.\MessageBreak
Using \protect\pagestitre\space instead}\pagestitre}
-\ifthenelse{\boolean{UL@babel}}{%
- \addto\captionsfrench{\renewcommand{\listfigurename}{Liste des figures}}}{}
+\ifUL@babel
+ \addto\captionsfrench{\renewcommand{\listfigurename}{Liste des figures}}
+\fi
\newcommand{\dedicace}[1]{{%
\clearpage
\pagestyle{empty}