%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% CLASS SETUP %%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{udem}[2026/04/27 0.0]

\newif\ifinfo@
\newif\ifphd@
\newif\ifcotutelle@
\newif\ifmaster@
\newif\ifdirected@
\newif\ifinternship@

% Handle all options specific to 'udem' class ...
\DeclareOption{info}{\info@true}
\DeclareOption{phd}{\phd@true}
\DeclareOption{cotutelle}{\cotutelle@true}
\DeclareOption{master}{\master@true}
\DeclareOption{directed}{\directed@true}
\DeclareOption{internship}{\internship@true}

% ... then pass all other options to 'amsbook' class
\DeclareOption*{%
  \PassOptionsToClass{\CurrentOption}{amsbook}%
}
\ProcessOptions\relax

\LoadClass{amsbook}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% LOCALIZATION %%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\AtBeginDocument{%
  % French translation
  \setlocalecaption{french}{coverpage}{Couverture}
  \setlocalecaption{french}{part}{Partie}
  \setlocalecaption{french}{chapter}{Chapitre}
  \setlocalecaption{french}{appendix}{Annexe}
  \setlocalecaption{french}{bib}{Bibliographie}
  \setlocalecaption{french}{contents}{Table des matières}
  \setlocalecaption{french}{listfigure}{Liste des figures}
  \setlocalecaption{french}{listtable}{Liste des tableaux}
  \setlocalecaption{french}{acronyms}{Liste des sigles et des abréviations}
  \setlocalecaption{french}{index}{Index}
  \setlocalecaption{french}{abstract}{Résumé}
  \setlocalecaption{french}{proof}{Démonstration}
  \setlocalecaption{french}{table}{Tableau}
  \setlocalecaption{french}{figure}{Figure}
  \setlocalecaption{french}{theorem}{Théorème}
  \setlocalecaption{french}{lem}{Lemme}
  \setlocalecaption{french}{cor}{Corollaire}
  \setlocalecaption{french}{prop}{Proposition}
  \setlocalecaption{french}{defn}{Définition}
  \setlocalecaption{french}{ex}{Exemple}
  \setlocalecaption{french}{rem}{Remarque}
  \setlocalecaption{french}{algo}{Algorithme}
  \setlocalecaption{french}{note}{Note}
  \DefineBibliographyStrings{french}{
    bibliography = {Références bibliographiques},
  }
  % English translation
  \setlocalecaption{english}{coverpage}{Cover}
  \setlocalecaption{english}{part}{Part}
  \setlocalecaption{english}{chapter}{Chapter}
  \setlocalecaption{english}{appendix}{Appendix}
  \setlocalecaption{english}{bib}{Bibliography}
  \setlocalecaption{english}{contents}{Contents}
  \setlocalecaption{english}{listfigure}{List of Figures}
  \setlocalecaption{english}{listtable}{List of Tables}
  \setlocalecaption{english}{abstract}{Abstract}
  \setlocalecaption{english}{proof}{Proof}
  \setlocalecaption{english}{table}{Table}
  \setlocalecaption{english}{figure}{Figure}
  \setlocalecaption{english}{acronyms}{List of acronyms}
  \setlocalecaption{english}{index}{Index}
  \setlocalecaption{english}{theorem}{Theorem}
  \setlocalecaption{english}{lem}{Lemme}
  \setlocalecaption{english}{cor}{Corollaire}
  \setlocalecaption{english}{prop}{Proposition}
  \setlocalecaption{english}{defn}{Definition}
  \setlocalecaption{english}{ex}{Example}
  \setlocalecaption{english}{rem}{Remark}
  \setlocalecaption{english}{algo}{Algorithm}
  \setlocalecaption{english}{note}{Note}
  \DefineBibliographyStrings{english}{
    bibliography = {References},
  }
  % Other language translation
%  \setlocalecaption{english}{coverpage}{Cover}
%  \setlocalecaption{other}{part}{Part}
%  \setlocalecaption{other}{chapter}{Chapter}
%  \setlocalecaption{other}{appendix}{Appendix}
%  \setlocalecaption{other}{bib}{Bibliography}
%  \setlocalecaption{other}{contents}{Contents}
%  \setlocalecaption{other}{listfigure}{List of Figures}
%  \setlocalecaption{other}{listtable}{List of Tables}
%  \setlocalecaption{other}{abstract}{Abstract}
%  \setlocalecaption{other}{proof}{Proof}
%  \setlocalecaption{other}{table}{Table}
%  \setlocalecaption{other}{figure}{Figure}
%  \setlocalecaption{other}{ref}{References}
%  \setlocalecaption{other}{glossary}{List of acronyms}
%  \setlocalecaption{other}{index}{Index}
%  \setlocalecaption{other}{theorem}{Theorem}
%  \setlocalecaption{other}{lem}{Lemme}
%  \setlocalecaption{other}{cor}{Corollaire}
%  \setlocalecaption{other}{prop}{Proposition}
%  \setlocalecaption{other}{defn}{Definition}
%  \setlocalecaption{other}{ex}{Example}
%  \setlocalecaption{other}{rem}{Remark}
%  \setlocalecaption{other}{algo}{Algorithm}
%  \setlocalecaption{english}{note}{Note}
%  \DefineBibliographyStrings{other}{
%    bibliography = {References},
%  }
}% End of localized captions

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% METADATA %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\defmetadatafield#1{%
  \expandafter\def\csname #1\endcsname##1{%
    \expandafter\gdef\csname @#1\endcsname{##1}%
  }%
}

\defmetadatafield{version}        % Version of the document (used by the info option)
\defmetadatafield{submityear}     % Submission date (year)
\defmetadatafield{submitmonth}    % Submission date (month)
%\defmetadatafield{title}         % Title of the thesis/master (macro already provided by LaTeX)
\defmetadatafield{subtitle}       % Optional subtitle of the thesis/master
%\defmetadatafield{author}        % Full name of the student (macro already provided by LaTeX, but modified below)
\defmetadatafield{university}     % University
\defmetadatafield{partner}        % Partner organization for cotutelle phd
\defmetadatafield{department}     % Department
\defmetadatafield{faculty}        % Faculty
\defmetadatafield{field}          % Field of study
\defmetadatafield{specialty}      % Optional specialty
\defmetadatafield{copyrightowner} % Full name of the copyright owner
\defmetadatafield{copyrightyear}  % Year of the copyright
\defmetadatafield{ccshort}        % Abbreviated name of the CC license
\defmetadatafield{cclogo}         % Logo for the CC license
\defmetadatafield{ccdeed}         % URL to CC license deed
\defmetadatafield{moreinfo}       % Additional info below the CC line

% user can use \submit{year}{month} to set submission date
\def\submit#1#2{%
  \gdef\@submityear{#1}%
  \gdef\@submitmonth{#2}%
  % also set copyrightyear by default
  \gdef\@copyrightyear{#1}%
}

% redefine \author so it also sets \@copyrightowner
\def\author#1{%
  \gdef\@author{#1}%
  \gdef\@copyrightowner{#1}%
}

% allows for customization of member's name, but also member's title
\def\defjuryfield#1#2{%
  \expandafter\def\csname #1\endcsname##1{%
    \expandafter\gdef\csname @#1\endcsname{##1}%
  }%
  \expandafter\def\csname #1title\endcsname##1{%
    \expandafter\gdef\csname @#1title\endcsname{##1}%
  }%
  \expandafter\csname #1title\endcsname{#2}%
}%

\defjuryfield{chair}            {Président rapporteur}
\defjuryfield{supervisor}       {Directeur de recherche}
\defjuryfield{cosupervisor}     {Codirecteur de recherche}
\defjuryfield{cosupervisortwo}  {Codirecteur de recherche}
\defjuryfield{cosupervisorthree}{Codirecteur de recherche}
\defjuryfield{jurymember}       {Membre du jury}
\defjuryfield{jurymembertwo}    {Membre du jury}
\defjuryfield{jurymemberthree}  {Membre du jury}
\defjuryfield{examiner}         {Examinateur externe}
\defjuryfield{deanrep}          {Représentant du doyen}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% DOCUMENT FORMATTING %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\voffset=0pt %1 inch=2.54 cm de marge en haut
\headheight=12pt
\headsep=16pt
\footskip=36pt %52pt%44pt%20pt
\textheight=656pt
\topskip=10pt
\topmargin=-29pt
\textwidth=470pt%451pt%413pt
\columnsep=10pt
\columnseprule=0pt
\oddsidemargin=0pt%56pt
\evensidemargin=0pt
\hoffset=0pt
\marginparwidth=0pt%60pt
\marginparsep=0pt%10pt
\marginparpush=5pt

% stretch content vertically to align the text at the bottom of the page
%\flushbottom
% doesn't do that
\raggedbottom

\def\ps@udem{
  \def\@evenhead{\hfil}
  \let\@oddhead\@evenhead
  \def\@evenfoot{\normalfont\hfil\thepage\hfil}
  \let\@oddfoot\@evenfoot
}
\let\ps@plain\ps@udem

\pagestyle{udem}

\def\removechapterpagination{
  \def\ps@plain{
    \def\@evenhead{\hfil}
    \let\@oddhead\@evenhead
    \def\@evenfoot{\hfil}
    \let\@oddfoot\@evenfoot
  }
}

\def\@makechapterhead#1{\global \topskip 5pc\relax
    \begingroup
        \normalfont\LARGE\bfseries \centering
        \ifnum\c@secnumdepth>\m@ne
            \leavevmode \hskip-\leftskip
            \rlap{\vbox to\z@{\vss
                \leftline{\bfseries\LARGE\selectfont\@xp{\chaptername}\enspace\thechapter}
                \vskip 1pt}}%  %fin du \rlap et \vbox
            \hskip\leftskip
        \fi                    %fin du \ifnum
        \vskip 0pt%
        \vbox{\hrule width \hsize height .1mm}%
        \vskip 9pt
        #1 \par
        \vskip 42pt \par
    \endgroup
    \skip@=36\p@%
    \advance\skip@ by -\normalbaselineskip
    \vskip\skip@%
}

\def\@makeschapterhead#1{%
    \global\topskip 5pc\relax
    \begingroup
        \Large\bfseries
        \leftline{#1}
        \vskip0pt
        \vbox{\hrule width \hsize}
        \vskip42pt
        \par
    \endgroup
    \skip@=36pt
    \advance\skip@-\normalbaselineskip
    \vskip\skip@
}

\def\section{%
    \@startsection{section}
        {1}
        \z@
        {.7\linespacing\@plus\linespacing}
        {.5\linespacing}
        {\Large\bfseries}%
}

\def\subsection{%
    \@startsection{subsection}
        {2}
        \z@
        {6\p@\@plus2\p@}
        {1em}%
        {\large\bfseries}%
}

\def\subsubsection{%
    \@startsection{subsubsection}
        {3}
        %\normalparindent
\z@
        {6\p@\@plus2\p@}
        {-1ex}
        {\bfseries}%
}

\def\paragraph{%
    \@startsection{paragraph}
        {4}
        \z@
        \z@
        {-\fontdimen2\font}
        {\normalfont\global\advance\c@paragraph by 1}%
}

\def\subparagraph{%
    \@startsection{subparagraph}
        {5}
        \z@
        \z@
        {-\fontdimen2\font}
        \normalfont%
}

\renewcommand\thechapter       {\arabic{chapter}}
\renewcommand\thesection       {\thechapter.\arabic{section}}
\renewcommand\thesubsection    {\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection {\thesubsection .\arabic{subsubsection}}
\renewcommand\theparagraph     {\thesubsubsection.\arabic{paragraph}}

\newtheoremstyle{plain-noindent}
  {3pt}
  {3pt}
  {\normalfont}
  {0pt}
  {\bfseries}
  {.}
  { }
  {}
\theoremstyle{plain-noindent}
\newtheorem{thm}{\theoremname}[chapter]
\newtheorem{cor}[thm]{\corname}
\newtheorem{prop}[thm]{\propname}
\newtheorem{lem}[thm]{\lemname}
\newtheorem{defn}[thm]{\defnname}
\newtheorem{ex}[thm]{\exname}
\newtheorem{rem}[thm]{\remname}
\newtheorem{algo}[thm]{\algoname}
\newtheorem{note}[thm]{\notename}

\renewenvironment{proof}[1][\proofname]{%
  \par \normalfont \noindent
  \trivlist \itemindent0pt
  \item[\hskip\labelsep\itshape#1\@addpunct{.}]\ignorespaces
}{%
  \qed\endtrivlist
}

%%
%% Numérotation des équations par section
%% et des  tableaux et figures par chapitre.
%% Ceci peut être modifié selon les préférences de l'utilisateur.
\numberwithin{equation}{section}
\numberwithin{table}{chapter}
\numberwithin{figure}{chapter}


%% Il est obligatoire d'écrire à double interligne
%% ou à interligne et demi. On peut soit utiliser
%% le package <setspace> ou \baselinestretch.
%% Le package a tendance a créé des grands blancs,
%% le gabarit décourage son utilisation, mais il en
%% reste à la discrétion de l'utilisateur·e.
%% \usepackage[onehalfspacing]{setspace}
 % ou
\renewcommand{\baselinestretch}{1.286} %Interligne et demi (environ 18pt (12pt+6pt) entre les lignes)

\ifinfo@\AtBeginDocument{%
  \newcount\@hours
  \newcount\@minutes
  \newcount\@temp
  \def\@HHMM{%
    \@hours=\time
    \divide\@hours by 60
    \@minutes=\time
    \@temp=\@hours
    \multiply\@temp by 60
    \advance\@minutes by -\@temp
    \ifnum\@hours<10 0\fi\number\@hours:%
    \ifnum\@minutes<10 0\fi\number\@minutes
  }
  \def\ps@udeminfo{
    \def\@evenhead{%
      \normalfont\footnotesize%
      \hfil[\,Version \@version--\today--\@HHMM\,]\hfil%
    }
    \let\@oddhead\@evenhead
    \def\@evenfoot{\normalfont\hfil\thepage\hfil}
    \let\@oddfoot\@evenfoot
  }
  \let\ps@plain\ps@udeminfo
  \def\ps@empty{
    \def\@evenhead{%
      \normalfont\footnotesize%
      \hfil[\,Version \@version--\today--\@HHMM\,]\hfil%
    }
    \let\@oddhead\@evenhead
    \def\@evenfoot{\hfil}
    \let\@oddfoot\@evenfoot
  }
  \pagestyle{udeminfo}
  \def\removechapterpagination{
    \def\ps@plain{
      \def\@evenhead{%
        \normalfont\footnotesize%
        \hfil[\,Version \@version--\today--\@HHMM\,]\hfil%
      }
      \let\@oddhead\@evenhead
      \def\@evenfoot{\hfil}
      \let\@oddfoot\@evenfoot
    }
  }
}\fi % end of \ifinfo

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% FRONT MATTER %%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%
%% Definitions for the pieces of text in the title page
%%

\ifphd@       \def\@doctype{Thèse présentée}\fi
\ifcotutelle@ \def\@doctype{%
  Thèse réalisée en cotutelle avec \@partner\\
  présentée}\fi
\ifmaster@    \def\@doctype{Mémoire présenté}\fi
\ifdirected@  \def\@doctype{Travail dirigé présenté}\fi
\ifinternship@\def\@doctype{Rapport de stage présenté}\fi

% https://registraire.umontreal.ca/documents-officiels/abreviations-et-appellations-des-grades-et-des-diplomes/
\ifphd@       \def\@degree{philosophi\ae\ doctor (Ph. D.)}\fi
\ifcotutelle@ \def\@degree{philosophi\ae\ doctor (Ph. D.)}\fi
\ifmaster@    \def\@degree{maîtrise ès sciences (M. Sc.)}\fi
\ifdirected@  \def\@degree{maîtrise ès sciences (M. Sc.)}\fi
\ifinternship@\def\@degree{maîtrise ès sciences (M. Sc.)}\fi

\def\@graduateline{%
  \@doctype\ en vue de l'obtention du grade de \@degree\\
  en \@field\ifcsname @specialty\endcsname, option \@specialty\fi
}

%%
%% Definitions for paragraphs in the title page, with styles applied
%%

\def\@universitypar{\centerline{\bfseries\Large\@university}}

\def\@titleline{{\bfseries\Large\@title}}
\def\@titlepar{
  \vtop{
    \centering
    \ifcsname @subtitle\endcsname
      \@titleline\\
      \vtop{
        \vrule width 0pt height 20pt
        {\itshape\large\@subtitle}\par
      }
    \else
      \@titleline\par
    \fi
  }
}

\def\@authorpar{
  \vtop{
    \centering
    {\bfseries\Large\@author}\par
  }
}

\def\@facultypar{
  \vtop{
    \centering
    \footnotesize
    \@department,\\
    \@faculty\par
  }
}

\def\@graduatepar{
  \vtop{
    \centering
    \small
    \@graduateline\par
  }
}

\def\@submitdatepar{\centerline{\@submitmonth\ \@submityear}}

\def\@copyrightpar{\centerline{%
  \copyright\ \footnotesize\scshape\@copyrightowner,\ \@copyrightyear
}}

\def\@ccpar{%
  \ifcsname @ccshort\endcsname\ifcsname @cclogo\endcsname\ifcsname @ccdeed\endcsname
    \centerline{\href{\@ccdeed}{\@cclogo\ \footnotesize%
    Sauf indication contraire, ce document est sous license \@ccshort}}
    \ifcsname @moreinfo\endcsname
      \centerline{\footnotesize\@moreinfo}
    \fi    
  \fi\fi\fi
}
  
%%
%% Definition of the title page
%%

\renewenvironment{titlepage}{%
  \par
  \@topnum\z@
  \clearpage
  \thispagestyle{empty}
  \begingroup
  \normalfont\normalsize
}{%
  \endgroup
  \cleardoublepage
  \thispagestyle{empty}
  \c@footnote\z@
}%

\renewcommand{\maketitle}{%
  \@validatemaketitle
  \begin{titlepage}
    \@universitypar
    \vfill
    \@titlepar
    \vfill
    \centerline{Par}
    \vskip10\p@\@minus10\p@
    \@authorpar
    \vfill
    \@facultypar
    \vfill
    \baselineskip9\p@
    \@graduatepar
    \vfill
    \@submitdatepar
    \vfill
    \@copyrightpar
    \@ccpar
  \end{titlepage}
}

%%
%% Definitions for the pieces of text in the title page
%%

\ifphd@       \def\@titledline{Cette thèse intitulée}\fi
\ifcotutelle@ \def\@titledline{Cette thèse intitulée}\fi
\ifmaster@    \def\@titledline{Ce mémoire intitulé}\fi
\ifdirected@  \def\@titledline{Ce travail dirigé intitulé}\fi
\ifinternship@\def\@titledline{Ce rapport de stage intitulé}\fi

\ifphd@       \def\@presentedline{présentée par}\fi
\ifcotutelle@ \def\@presentedline{présentée par}\fi
\ifmaster@    \def\@presentedline{présenté par}\fi
\ifdirected@  \def\@presentedline{présenté par}\fi
\ifinternship@\def\@presentedline{présenté par}\fi

\ifphd@       \def\@evaluatedline{a été évaluée par un jury composé des personnes suivantes}\fi
\ifcotutelle@ \def\@evaluatedline{a été évaluée par un jury composé des personnes suivantes}\fi
\ifmaster@    \def\@evaluatedline{a été évalué par un jury composé des personnes suivantes}\fi
\ifdirected@  \def\@evaluatedline{a été évalué par un jury composé des personnes suivantes}\fi
\ifinternship@\def\@evaluatedline{a été évalué par un jury composé des personnes suivantes}\fi

%%
%% Definitions for paragraphs in the jury page, with styles applied
%%

\newcommand{\@underlinerulecenter}[2][0pt]{%
  \setbox0=\hbox{#2}%
  \centerline{\copy0}%
  \nointerlineskip
  \dimen0=\wd0%
  \advance\dimen0 by 2pc%
  \ifdim\dimen0<#1\relax
    \dimen0=#1\relax
  \fi
  \centerline{\vrule width \dimen0 height -3pt depth 3.3pt}
}

\def\@titledpar{\centerline{\@titledline}}

\def\@presentedpar{\centerline{\@presentedline}}

\def\@evaluatedpar{\centerline{\@evaluatedline}}

\def\@memberpar#1{
  \ifcsname @#1\endcsname%
    \vskip30\p@\@minus15\p@
    \vtop{%
      \centering
      \@underlinerulecenter[11pc]{\itshape\csname @#1\endcsname}
      {\footnotesize\csname @#1title\endcsname}
    }
  \fi%
}%

%%
%% Definition of the jury presentation page
%%

\newcommand{\makejury}{%
  \@validatemakejury
  \begin{titlepage}
    \@universitypar
    \vskip20\p@\@minus20\p@
    \@underlinerulecenter\@facultypar
    \vfill
    \@titledpar
    \vskip20\p@\@minus20\p@
    \@titlepar
    \vfill
    \@presentedpar
    \vskip20\p@\@minus20\p@
    \@authorpar
    \vfill
    \@evaluatedpar
    \@memberpar{chair}
    \@memberpar{supervisor}
    \@memberpar{cosupervisor}
    \@memberpar{cosupervisortwo}
    \@memberpar{cosupervisorthree}
    \@memberpar{jurymember}
    \@memberpar{jurymembertwo}
    \@memberpar{jurymemberthree}
    \@memberpar{examiner}
    \@memberpar{deanrep}
  \end{titlepage}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% ERROR HELPERS %%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\diro@maketitle@missing#1{%
  \ClassError{diro}{%
    Assurez-vous de remplir tous les champs obligatoires d'une page titre (i.e. \string\title, \string\author, \string\domain, \string\date\space et \string\licenseyear)%
  }{%
    DIRO : Vous devez remplir le champ \string#1 avant d'appeler \string\maketitle%
  }
}

\def\@validatemaketitle{%
  \ifcsname @title\endcsname\else%
    \diro@maketitle@missing\title%
  \fi%
  \ifcsname @author\endcsname\else%
    \diro@maketitle@missing\author%
  \fi%
  \ifcsname @field\endcsname\else%
    \diro@maketitle@missing\field%
  \fi%
  \ifcsname @submityear\endcsname\else%
    \diro@maketitle@missing\submityear%
  \fi%
  \ifcsname @submitmonth\endcsname\else%
    \diro@maketitle@missing\submitmonth%
  \fi%
  \ifcsname @copyrightyear\endcsname\else%
    \diro@maketitle@missing\copyrightyear%
  \fi%
}

\def\diro@makejury@missing#1{%
  \ClassError{diro}{%
    Assurez-vous de remplir tous les champs obligatoires d'une page de jury (i.e. \string\title, \string\author, \string\president, \string\directeur, \string\membrejury\ifphd@, \string\examinateur\fi)%
  }{%
    DIRO : Vous devez remplir le champ \string#1 avant d'appeler \string\makejury%
  }%
}%

\def\@validatemakejury{%
  \ifcsname @title\endcsname\else%
    \diro@makejury@missing\title%
  \fi%
  \ifcsname @author\endcsname\else%
    \diro@makejury@missing\author%
  \fi%
  \ifcsname @chair\endcsname\else%
    \diro@makejury@missing\chair%
  \fi%
  \ifcsname @supervisor\endcsname\else%
    \diro@makejury@missing\supervisor%
  \fi%
  \ifcsname @jurymember\endcsname\else%
    \diro@makejury@missing\jurymember%
  \fi%
  \ifphd@%
    \ifcsname @examiner\endcsname\else%
      \diro@makejury@missing\examiner%
    \fi%
  \fi%
  \ifcotutelle@%
    \ifcsname @examiner\endcsname\else%
      \diro@makejury@missing\examiner%
    \fi%
  \fi%
}

\endinput
% end of file udem.cls