From 207ea64ecb2871df4949f8cd61c9c69d1a749b4f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 24 Jul 2024 12:54:22 +0200 Subject: [PATCH] fix bib, with ability to add a preface --- rapstage.cls | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rapstage.cls b/rapstage.cls index 139c64c..346bc21 100644 --- a/rapstage.cls +++ b/rapstage.cls @@ -48,7 +48,7 @@ \RequirePackage[a4paper,top=35mm,bottom=33mm,left=5cm,right=5cm]{geometry} % Style de bibliographie -\addto{\extrasfrench}{\renewcommand\refname{Bibliographie}} +\addto{\extrasfrench}{\renewcommand\refname{\hspace{4em}Bibliographie}} \bibliographystyle{unsrt} % Auteur @@ -230,7 +230,8 @@ } % Permet d'ajouter la bibliographie -\newcommand{\reference}{ +\RequirePackage{etoolbox} +\newcommand{\@reference}{ \newpage \addcontentsline{toc}{section}{\refname} \bibliography{\@refile} @@ -238,6 +239,12 @@ \newpage \pagestyle{empty} } +\newcommand{\reference@unstarred}{\@reference} +\newcommand{\reference@starred}[1]{ + \patchcmd{\thebibliography}{\list}{#1 \\ \list}{}{} + \@reference +} +\newcommand{\reference}{\@ifstar{\reference@starred}{\reference@unstarred}} % Souligne mieux les mots \newcommand{\ul}[1]{\underline{\smash{#1}}}