\ProvidesClass{rapstage}[2024/02/06 Rapport de stage de Paris Cité] \LoadClass[12pt]{article} % Options \newif\ifoption@code \DeclareOption{code}{\option@codetrue} \newif\ifoption@f \DeclareOption{f}{\option@ftrue} \newif\ifoption@n \DeclareOption{n}{\option@ntrue} \newcommand{\@student}{Étudiant} \ProcessOptions \ifoption@code % Intégration code \RequirePackage{minted} \usemintedstyle{emacs} \fi \ifoption@f % Mode féminin \renewcommand{\@student}{Étudiante} \fi \ifoption@n % Mode neutre \renewcommand{\@student}{Étudiant·e} \fi % Encodage \RequirePackage[T1]{fontenc} % Polices \RequirePackage{mathptmx} % Times New Roman \RequirePackage{fontspec} % Arial \setmainfont{Times New Roman} \RequirePackage[french]{babel} % langage \frenchsetup{SmallCapsFigTabCaptions=false} % Change page dimensions \RequirePackage[a4paper]{geometry} % Style de bibliographie \addto{\extrasfrench}{\renewcommand\refname{Bibliographie}} \bibliographystyle{unsrt} % TODO : Autoriser des commandes sans mail % Auteur \newcommand{\me}[3]{ \gdef\@mef{#1} % first name \gdef\@mel{#2} % last name \gdef\@mail{mailto:#3} % mail } \newcommand{\@mef}{Alice} \newcommand{\@mel}{Dubois} \newcommand{\@mail}{mailto:alice.dubois@example.com} % Titre \renewcommand{\title}[1]{\gdef\@title{#1}} \renewcommand{\@title}{TITRE DU RAPPORT} % Date \renewcommand{\date}[1]{\gdef\@date{#1}} \renewcommand{\@date}{AAAA/AAAA} % Tuteur pédagogique \newcommand{\tuteurpedago}[2]{ \gdef\@tpn{#1} % nom \gdef\@tpm{mailto:#2} % mail } \newcommand{\@tpn}{John Doe} \newcommand{\@tpm}{mailto:john.doe@example.com} % Tuteur entreprise \newcommand{\tuteurentreprise}[2]{ \gdef\@ten{#1} % nom \gdef\@tem{mailto:#2} % mail } \newcommand{\@ten}{Bob Dupont} \newcommand{\@tem}{mailto:bob.dupont@example.com} % Directeurice université \newcommand{\directeur}[1]{\gdef\@directeur{#1}} \newcommand{\@directeur}{Carole \textsc{Delporte}} % Sous-titre \newcommand{\subtitle}[1]{\gdef\@subtitle{#1}} \newcommand{\@subtitle}{Rapport de Stage de Master 2} % Fichier de la bibliographie \newcommand{\bibliofile}[1]{\gdef\@refile{#1}} % Mise en page \RequirePackage{sectsty} \sectionfont{\setmainfont{Arial}\LARGE\bfseries} \subsectionfont{\setmainfont{Arial}\Large\bfseries\itshape} % Point après numéro dans le titre \RequirePackage{titlesec} \titlelabel{\thetitle.\quad} % Interligne \RequirePackage{setspace} \setstretch{1.15} % Page current/max \RequirePackage[page]{totalcount} \RequirePackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \cfoot{\thepage/\totalpages} \renewcommand{\headrulewidth}{0pt} % Liens cliquable et métadonnées \RequirePackage{hyperref} \AtBeginDocument{ \hypersetup{ pdfauthor={\@mef~\@mel}, pdftitle={\@title}, pdfkeywords={rapport, stage}, pdfsubject={Université Paris Cité}, pdfcreator={LaTeX with hyperref package and rapstage class}, hidelinks, } } % Images \RequirePackage{graphicx,float} % Figures \usepackage[font=it,labelsep=colon]{caption} \addto\captionsfrench{\renewcommand{\figurename}{Illustration}} \renewcommand{\maketitle}{ \begin{titlepage} \begin{center} \includegraphics[height=3.5cm]{images/logo.png} { \setmainfont{Arial} \LARGE Université de Paris\\ } \vspace{1cm} \Large \textsc{Faculté de Sciences}\\ \vspace{3mm} UFR d'Informatique\\ Directrice : \@directeur\\ \vspace{15mm} \textsc{\@subtitle}\\ \LARGE \textsc{\textbf{\underline{\@title}}} \vspace{25mm} \Large \begin{tabular}{ll} \itshape Tuteur pédagogique : & \itshape\href{\@tpm}{\@tpn} \\ \itshape Tuteur en entreprise : & \itshape\href{\@tem}{\@ten} \\ \end{tabular} \vspace{1cm} \hfill \textit{\@student : \href{\@mail}{\@mef~\textsc{\@mel}}} \vfill \textsc{Année universitaire \@date} \end{center} \end{titlepage} % Nouvelle page vierge \setcounter{page}{3} \shipout\null \newgeometry{ left=4cm, right=2cm, top=3.51cm, bottom=3.51cm, } } % Permet d'ajouter la bibliographie \newcommand{\reference}{ \newpage \pagestyle{empty} \addcontentsline{toc}{section}{\refname} \bibliography{\@refile} } % Souligne mieux les mots \newcommand{\ul}[1]{\underline{\smash{#1}}} % Ne déborde pas sur la marge \AtBeginDocument{ \sloppy }