From ca9ffe3347393eca802dbd721867896ea822b472 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 21 May 2014 17:53:07 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20d'une=20option=20'nocustomtitle'=20pour?= =?UTF-8?q?=20d=C3=A9sactiver=20la=20modification=20de=20la=20page=20de=20?= =?UTF-8?q?titre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 111 ++++++++++++++------------ 1 file changed, 60 insertions(+), 51 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 85e09861..0f9d2d34 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -12,6 +12,11 @@ \newif{\iffancycapo} \DeclareOption{fancy-capo}{\fancycapotrue} +% nocustomtitle: Disable title page fancy definition (back to LaTeX default) +\newif{\ifcustomtitle} +\customtitletrue +\DeclareOption{nocustomtitle}{\customtitlefalse} + % Remaining options are passed to the SongbookUtils package \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{SongbookUtils}} @@ -90,63 +95,67 @@ \clearheadinfo -\def\maketitle{ - \@maketitle - \clearheadinfo -} +\ifcustomtitle + \def\maketitle{ + \@maketitle + \clearheadinfo + } +\fi \newcounter{@inst} \newcounter{@auth} \newcounter{auco} -\def\@titlefont{\Huge\bfseries\boldmath} -\def\@subtitlefont{\large\bfseries\boldmath} - - -\def\@getelement#1{\csname @#1\endcsname} -\def\@labelelement#1{\csname label#1name\endcsname} -\def\@insertelement#1{\if!\@getelement{#1}! - \else % - \@labelelement{#1}& % - \@getelement{#1} \cr % - \fi % - } - -\def\@maketitle{ - \def\and{\unskip,\cr&} - \begin{titlepage} - \thispagestyle{empty} - \begin{center} - {\rule{\textwidth}{1mm}} - {\@titlefont\@title\par} - \if!\@subtitle!\else - {\hfil\@subtitlefont\@subtitle\par} - \fi - {\rule{\textwidth}{1mm}} - \end{center} - \vfil - \ialign{ - \bf{##} \hfil & ## \hfil \cr % Lines definition - \@insertelement{version} % - \@insertelement{date} % - \@insertelement{author} % - \@insertelement{web} % - \@insertelement{mail} % - } - \vfil - \begin{center} - \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} - \vskip1em - {\hfil\hbox{\small \@picturecopyright}} - \end{center} - \begin{flushright} - \vfil - {\hfil\rule{.4\textwidth}{.75pt}\par} - \@footer - \end{flushright} - \end{titlepage} -} +\ifcustomtitle + \def\@titlefont{\Huge\bfseries\boldmath} + \def\@subtitlefont{\large\bfseries\boldmath} + + + \def\@getelement#1{\csname @#1\endcsname} + \def\@labelelement#1{\csname label#1name\endcsname} + \def\@insertelement#1{\if!\@getelement{#1}! + \else % + \@labelelement{#1}& % + \@getelement{#1} \cr % + \fi % + } + + \def\@maketitle{ + \def\and{\unskip,\cr&} + \begin{titlepage} + \thispagestyle{empty} + \begin{center} + {\rule{\textwidth}{1mm}} + {\@titlefont\@title\par} + \if!\@subtitle!\else + {\hfil\@subtitlefont\@subtitle\par} + \fi + {\rule{\textwidth}{1mm}} + \end{center} + \vfil + \ialign{ + \bf{##} \hfil & ## \hfil \cr % Lines definition + \@insertelement{version} % + \@insertelement{date} % + \@insertelement{author} % + \@insertelement{web} % + \@insertelement{mail} % + } + \vfil + \begin{center} + \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} + \vskip1em + {\hfil\hbox{\small \@picturecopyright}} + \end{center} + \begin{flushright} + \vfil + {\hfil\rule{.4\textwidth}{.75pt}\par} + \@footer + \end{flushright} + \end{titlepage} + } +\fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%