format, follow a silly new standard and dont add spacing for bibliography in the toc
This commit is contained in:
parent
fbf6a69c01
commit
a5ae8e7a0a
2 changed files with 41 additions and 40 deletions
|
@ -17,7 +17,7 @@
|
||||||
\nocite{*}
|
\nocite{*}
|
||||||
|
|
||||||
% Commande pour ajouter un lien
|
% Commande pour ajouter un lien
|
||||||
\newcommand{\link}[1]{\href{#1}{\texttt{\textcolor{blue}{\ul{#1}}}}}
|
\newcommand\link[1]{\href{#1}{\texttt{\textcolor{blue}{\ul{#1}}}}}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
79
rapstage.cls
79
rapstage.cls
|
@ -10,7 +10,7 @@
|
||||||
\newif\ifoption@n
|
\newif\ifoption@n
|
||||||
\DeclareOption{n}{\option@ntrue}
|
\DeclareOption{n}{\option@ntrue}
|
||||||
|
|
||||||
\newcommand{\@student}{Étudiant}
|
\newcommand\@student{Étudiant}
|
||||||
|
|
||||||
\ProcessOptions
|
\ProcessOptions
|
||||||
\ifoption@code
|
\ifoption@code
|
||||||
|
@ -20,11 +20,11 @@
|
||||||
\fi
|
\fi
|
||||||
\ifoption@f
|
\ifoption@f
|
||||||
% Mode féminin
|
% Mode féminin
|
||||||
\renewcommand{\@student}{Étudiante}
|
\renewcommand\@student{Étudiante}
|
||||||
\fi
|
\fi
|
||||||
\ifoption@n
|
\ifoption@n
|
||||||
% Mode neutre
|
% Mode neutre
|
||||||
\renewcommand{\@student}{Étudiant·e}
|
\renewcommand\@student{Étudiant·e}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
% Encodage
|
% Encodage
|
||||||
|
@ -48,75 +48,76 @@
|
||||||
\RequirePackage[a4paper,top=35mm,bottom=33mm,left=5cm,right=5cm]{geometry}
|
\RequirePackage[a4paper,top=35mm,bottom=33mm,left=5cm,right=5cm]{geometry}
|
||||||
|
|
||||||
% Style de bibliographie
|
% Style de bibliographie
|
||||||
\addto{\extrasfrench}{\renewcommand{\refname}{\hspace{4em}Bibliographie}}
|
\newcommand\@bib{Bibliographie}
|
||||||
|
\renewcommand\frenchrefname{\hspace{4em}\@bib}
|
||||||
\bibliographystyle{unsrt}
|
\bibliographystyle{unsrt}
|
||||||
|
|
||||||
% Auteur
|
% Auteur
|
||||||
\newcommand{\me@unstarred}[3]{
|
\newcommand\me@unstarred[3]{
|
||||||
\gdef\@mef{#1} % first name
|
\gdef\@mef{#1} % first name
|
||||||
\gdef\@mel{#2} % last name
|
\gdef\@mel{#2} % last name
|
||||||
\gdef\@mail{mailto:#3} % mail
|
\gdef\@mail{mailto:#3} % mail
|
||||||
}
|
}
|
||||||
\newcommand{\me@starred}[2]{
|
\newcommand\me@starred[2]{
|
||||||
\gdef\@mef{#1} % first name
|
\gdef\@mef{#1} % first name
|
||||||
\gdef\@mel{#2} % last name
|
\gdef\@mel{#2} % last name
|
||||||
\gdef\@mail{} % mail
|
\gdef\@mail{} % mail
|
||||||
}
|
}
|
||||||
\newcommand{\me}{\@ifstar{\me@starred}{\me@unstarred}}
|
\newcommand\me{\@ifstar{\me@starred}{\me@unstarred}}
|
||||||
\newcommand{\@mef}{Alice}
|
\newcommand\@mef{Alice}
|
||||||
\newcommand{\@mel}{Dubois}
|
\newcommand\@mel{Dubois}
|
||||||
\newcommand{\@mail}{mailto:alice.dubois@example.com}
|
\newcommand\@mail{mailto:alice.dubois@example.com}
|
||||||
|
|
||||||
% Titre
|
% Titre
|
||||||
\renewcommand{\title}[1]{\gdef\@title{#1}}
|
\renewcommand\title[1]{\gdef\@title{#1}}
|
||||||
\renewcommand{\@title}{TITRE DU RAPPORT}
|
\renewcommand\@title{TITRE DU RAPPORT}
|
||||||
|
|
||||||
% Date
|
% Date
|
||||||
\newcount\lastyear
|
\newcount\lastyear
|
||||||
\lastyear=\year
|
\lastyear=\year
|
||||||
\advance\lastyear by -1
|
\advance\lastyear by -1
|
||||||
|
|
||||||
\renewcommand{\date}[1]{\gdef\@date{#1}}
|
\renewcommand\date[1]{\gdef\@date{#1}}
|
||||||
\renewcommand{\@date}{\the\lastyear{}/\the\year{}}
|
\renewcommand\@date{\the\lastyear{}/\the\year{}}
|
||||||
|
|
||||||
% Tuteur pédagogique
|
% Tuteur pédagogique
|
||||||
\newcommand{\tuteurpedago@unstarred}[2]{
|
\newcommand\tuteurpedago@unstarred[2]{
|
||||||
\gdef\@tpn{#1} % nom
|
\gdef\@tpn{#1} % nom
|
||||||
\gdef\@tpm{mailto:#2} % mail
|
\gdef\@tpm{mailto:#2} % mail
|
||||||
}
|
}
|
||||||
\newcommand{\tuteurpedago@starred}[1]{
|
\newcommand\tuteurpedago@starred[1]{
|
||||||
\gdef\@tpn{#1} % nom
|
\gdef\@tpn{#1} % nom
|
||||||
\gdef\@tpm{} % mail
|
\gdef\@tpm{} % mail
|
||||||
}
|
}
|
||||||
\newcommand{\tuteurpedago}{
|
\newcommand\tuteurpedago{
|
||||||
\@ifstar{\tuteurpedago@starred}{\tuteurpedago@unstarred}}
|
\@ifstar{\tuteurpedago@starred}{\tuteurpedago@unstarred}}
|
||||||
\newcommand{\@tpn}{John \textsc{Doe}}
|
\newcommand\@tpn{John \textsc{Doe}}
|
||||||
\newcommand{\@tpm}{mailto:john.doe@example.com}
|
\newcommand\@tpm{mailto:john.doe@example.com}
|
||||||
|
|
||||||
% Tuteur entreprise
|
% Tuteur entreprise
|
||||||
\newcommand{\tuteurentreprise@unstarred}[2]{
|
\newcommand\tuteurentreprise@unstarred[2]{
|
||||||
\gdef\@ten{#1} % nom
|
\gdef\@ten{#1} % nom
|
||||||
\gdef\@tem{mailto:#2} % mail
|
\gdef\@tem{mailto:#2} % mail
|
||||||
}
|
}
|
||||||
\newcommand{\tuteurentreprise@starred}[1]{
|
\newcommand\tuteurentreprise@starred[1]{
|
||||||
\gdef\@ten{#1} % nom
|
\gdef\@ten{#1} % nom
|
||||||
\gdef\@tem{} % mail
|
\gdef\@tem{} % mail
|
||||||
}
|
}
|
||||||
\newcommand{\tuteurentreprise}{
|
\newcommand\tuteurentreprise{
|
||||||
\@ifstar{\tuteurentreprise@starred}{\tuteurentreprise@unstarred}}
|
\@ifstar{\tuteurentreprise@starred}{\tuteurentreprise@unstarred}}
|
||||||
\newcommand{\@ten}{Bob \textsc{Dupont}}
|
\newcommand\@ten{Bob \textsc{Dupont}}
|
||||||
\newcommand{\@tem}{mailto:bob.dupont@example.com}
|
\newcommand\@tem{mailto:bob.dupont@example.com}
|
||||||
|
|
||||||
% Directeurice université
|
% Directeurice université
|
||||||
\newcommand{\directeur}[1]{\gdef\@directeur{#1}}
|
\newcommand\directeur[1]{\gdef\@directeur{#1}}
|
||||||
\newcommand{\@directeur}{Carole \textsc{Delporte}}
|
\newcommand\@directeur{Carole \textsc{Delporte}}
|
||||||
|
|
||||||
% Sous-titre
|
% Sous-titre
|
||||||
\newcommand{\subtitle}[1]{\gdef\@subtitle{#1}}
|
\newcommand\subtitle[1]{\gdef\@subtitle{#1}}
|
||||||
\newcommand{\@subtitle}{Rapport de Stage de Master 2}
|
\newcommand\@subtitle{Rapport de Stage de Master 2}
|
||||||
|
|
||||||
% Fichier de la bibliographie
|
% Fichier de la bibliographie
|
||||||
\newcommand{\bibliofile}[1]{\gdef\@refile{#1}}
|
\newcommand\bibliofile[1]{\gdef\@refile{#1}}
|
||||||
|
|
||||||
% Mise en page
|
% Mise en page
|
||||||
\RequirePackage{titlesec}
|
\RequirePackage{titlesec}
|
||||||
|
@ -137,7 +138,7 @@
|
||||||
\pagestyle{fancy}
|
\pagestyle{fancy}
|
||||||
\fancyhf{}
|
\fancyhf{}
|
||||||
\cfoot{\makebox[\textwidth][c]{\thepage/\totalpages}}
|
\cfoot{\makebox[\textwidth][c]{\thepage/\totalpages}}
|
||||||
\renewcommand{\headrulewidth}{0pt}
|
\renewcommand\headrulewidth{0pt}
|
||||||
|
|
||||||
% Liens cliquable et métadonnées
|
% Liens cliquable et métadonnées
|
||||||
\RequirePackage{hyperref}
|
\RequirePackage{hyperref}
|
||||||
|
@ -157,7 +158,7 @@
|
||||||
|
|
||||||
% Figures
|
% Figures
|
||||||
\RequirePackage[font=it,labelsep=colon]{caption}
|
\RequirePackage[font=it,labelsep=colon]{caption}
|
||||||
\addto{\captionsfrench}{\renewcommand{\figurename}{Illustration}}
|
\renewcommand\frenchfigurename{Illustration}
|
||||||
|
|
||||||
% Listes
|
% Listes
|
||||||
\AtBeginDocument{\def\labelitemi{\scriptsize$\bullet$}
|
\AtBeginDocument{\def\labelitemi{\scriptsize$\bullet$}
|
||||||
|
@ -165,7 +166,7 @@
|
||||||
\def\labelitemiii{\scriptsize$\bullet$}
|
\def\labelitemiii{\scriptsize$\bullet$}
|
||||||
\def\labelitemiv{\scriptsize$\bullet$}}
|
\def\labelitemiv{\scriptsize$\bullet$}}
|
||||||
|
|
||||||
\renewcommand{\maketitle}{
|
\renewcommand\maketitle{
|
||||||
\begin{titlepage}
|
\begin{titlepage}
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[alt={Logo},height=27mm]{images/logo.png}
|
\includegraphics[alt={Logo},height=27mm]{images/logo.png}
|
||||||
|
@ -231,26 +232,26 @@
|
||||||
|
|
||||||
% Permet d'ajouter la bibliographie
|
% Permet d'ajouter la bibliographie
|
||||||
\RequirePackage{etoolbox}
|
\RequirePackage{etoolbox}
|
||||||
\newcommand{\@reference}{
|
\newcommand\@reference{
|
||||||
\newpage
|
\newpage
|
||||||
\addcontentsline{toc}{section}{\refname}
|
\addcontentsline{toc}{section}{\@bib}
|
||||||
\bibliography{\@refile}
|
\bibliography{\@refile}
|
||||||
|
|
||||||
\newpage
|
\newpage
|
||||||
\pagestyle{empty}
|
\pagestyle{empty}
|
||||||
}
|
}
|
||||||
\newcommand{\reference@unstarred}{\@reference}
|
\newcommand\reference@unstarred{\@reference}
|
||||||
\newcommand{\reference@starred}[1]{
|
\newcommand\reference@starred[1]{
|
||||||
\patchcmd{\thebibliography}{\list}{#1 \\ \list}{}{}
|
\patchcmd{\thebibliography}{\list}{#1 \\ \list}{}{}
|
||||||
\@reference
|
\@reference
|
||||||
}
|
}
|
||||||
\newcommand{\reference}{\@ifstar{\reference@starred}{\reference@unstarred}}
|
\newcommand\reference{\@ifstar{\reference@starred}{\reference@unstarred}}
|
||||||
|
|
||||||
% Annexe
|
% Annexe
|
||||||
\addto{\captionsfrench}{\renewcommand{\appendixname}{\hspace{4em}Annexe}}
|
\renewcommand\frenchappendixname{\hspace{4em}Annexe}
|
||||||
|
|
||||||
% Souligne mieux les mots
|
% Souligne mieux les mots
|
||||||
\newcommand{\ul}[1]{\underline{\smash{#1}}}
|
\newcommand\ul[1]{\underline{\smash{#1}}}
|
||||||
|
|
||||||
% Ne déborde pas sur la marge
|
% Ne déborde pas sur la marge
|
||||||
\AtBeginDocument{
|
\AtBeginDocument{
|
||||||
|
|
Loading…
Reference in a new issue