\ProvidesPackage{titlepage}[
Sherbrooke Engineering Title Page by Benjamin Chausse
]
\RequirePackage{setspace}
\RequirePackage[french]{babel}

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
%                             Plain Definitions                              %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
\newcommand*{\institution}[1]{\gdef\@institution{#1}}
\newcommand*{\faculty}[1]{\gdef\@faculty{#1}}
\newcommand*{\department}[1]{\gdef\@department{#1}}
\renewcommand*{\title}[1]{\gdef\@title{#1}}
\newcommand*{\classnb}[1]{\gdef\@classnb{#1}}
\newcommand*{\class}[1]{\gdef\@class{#1}}
\renewcommand*{\author}[1]{\gdef\@author{#1}}
\newcommand*{\location}[1]{\gdef\@location{#1}}

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
%                           Templated Definitions                            %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
\newcommand*{\@institution}{Université de Sherbrooke}
\newcommand*{\@faculty}{Faculté de génie}
\newcommand*{\@department}{Département de génie en question}
\renewcommand*{\@title}{Titre du document}
\newcommand*{\@classnb}{EXE 222}
\newcommand*{\@class}{Numéro et nom du cours}
\renewcommand*{\@author}{Prénom NOM}
\newcommand*{\@location}{Sherbrooke (Québec) Canada}

% Simple Macro
\newcommand{\usp}{\unskip\strut\par}

%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
%                        Updated Title Page Template                         %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
\renewcommand*{\maketitle}{
\begin{titlepage}
  \centering\LARGE\setstretch{.7}
  {\MakeUppercase{\@institution}\usp}
  {\@faculty\usp}
  {\@department\usp}
  \vfill
  {\Huge\MakeUppercase{\@title}}
  \vfill
  {\@classnb\hspace{.420cm}\@class\usp}
  \vfill
  {\@author\usp}
  \vfill
  {\Large \@location\usp}
  \vspace{.69cm}
  {\Large\@date\par}
  \vspace{.420cm}
\end{titlepage}
}
