From 7a78c3b8b21b6842d27bb48f37197f8c380ccc5e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 18 Jun 2020 03:02:56 +0000 Subject: CTAN sync 202006180302 --- macros/latex/contrib/yathesis/source/yathesis.dtx | 139 ++++++++++++++-------- 1 file changed, 87 insertions(+), 52 deletions(-) (limited to 'macros/latex/contrib/yathesis/source/yathesis.dtx') diff --git a/macros/latex/contrib/yathesis/source/yathesis.dtx b/macros/latex/contrib/yathesis/source/yathesis.dtx index 984be7e0ae..9b7a90f18b 100644 --- a/macros/latex/contrib/yathesis/source/yathesis.dtx +++ b/macros/latex/contrib/yathesis/source/yathesis.dtx @@ -23,7 +23,7 @@ %<*readme> ----------------------------------------------------------------------- -- `yathesis` --- Yet Another Thesis Class, version 1.0.2 +- `yathesis` --- Yet Another Thesis Class, version 1.0.3 - E-mail: `denis.bitouze@univ-littoral.fr` - Released under the LaTeX Project Public License v1.3c or later. See http://www.latex-project.org/lppl.txt @@ -70,8 +70,8 @@ Typesetting the documentation of the class requires: \fi % %<*class|install> -\def\yathesisfileversion{1.0.2} -\def\yathesisfiledate{2020-04-13} +\def\yathesisfileversion{1.0.3} +\def\yathesisfiledate{2020-06-16} % %<*install> \input docstrip.tex @@ -278,6 +278,7 @@ This work consists of the file yathesis.dtx \documentclass[english,french]{ltxdoc} \usepackage[yad]{denisbdoc} \lstMakeShortInline[style=dbtex]" +%" \usepackage[lining]{libertine} \renewcommand{\ttdefault}{lmtt} \makeatletter @@ -854,7 +855,6 @@ This work consists of the file yathesis.dtx refsegment=chapter,% defernumbers=#1% }% - \AfterEndPreamble{\newrefsegment}% }% } \yadsetup{% @@ -955,7 +955,6 @@ This work consists of the file yathesis.dtx setspace/.code={\PassOptionsToPackage{#1}{setspace}},% xcolor/.code={\PassOptionsToPackage{#1}{xcolor}},% datatool/.code={\PassOptionsToPackage{#1}{datatool}},% - titleps/.code={\PassOptionsToPackage{#1}{titleps}},% titlesec/.code={\PassOptionsToPackage{#1}{titlesec}},% draftwatermark/.code={\PassOptionsToPackage{#1}{draftwatermark}},% babel/.code={\PassOptionsToPackage{#1}{babel}},% @@ -1083,7 +1082,7 @@ This work consists of the file yathesis.dtx % \end{macrocode} % Pour gérer les titres courants (entêtes) et bas de page % \begin{macrocode} -\RequirePackage[nopatches]{titleps}[2011/12/15]% +\RequirePackage[pagestyles]{titlesec}[2019/10/16]% % \end{macrocode} % Pour supprimer le numéro de page sur la page de titre d'une partie % \begin{macrocode} @@ -3116,7 +3115,7 @@ This work consists of the file yathesis.dtx % \begin{macro}{\pagestyle} % Redéfinition permettant d'éviter de devoir ajouter % \lstinline|\cleardoublepage| avant chaque la commande -% \lstinline|\pagestyle| fournie par le package \package{titleps} +% \lstinline|\pagestyle| fournie par le package \package{titlesec} % (cet ajout est pour l'instant nécessaire pour que les entêtes % aux frontières des chapitres non numérotés ne soient pas % erronés). @@ -3272,7 +3271,7 @@ This work consists of the file yathesis.dtx % \end{macrocode} % % Globalement dans le document, la table des matières et la -% numérotation des paragraphes vont jusqu'aux sous-sections +% numérotation des paragraphes vont jusqu'aux sous-sections. % \begin{macrocode} \etocsettocdepth{\YAD@tocdepth}% \AtBeginDocument{% @@ -3283,18 +3282,15 @@ This work consists of the file yathesis.dtx % % \end{macrocode} % -% Définition des styles de pages (basées sur le \Package{titleps}) +% Définition des styles de pages (basés sur le \Package{titleps}, chargé par le +% \Package{titlesec} avec l'option ×titleps×). % % \begin{macro}{\YAD@chapter@header} % Définition de titres courants % \begin{macrocode} \DeclareRobustCommand{\YAD@chapter@header}{% - \ifboolexpr{ - ((test {\ifnumcomp{\value{secnumdepth}}{>}{-1}} or (not bool - {YAD@nonnumbered@chapter})) and test {\ifnumcomp{\value{chapter}}{>}{0}}) and - (not bool {YAD@backmatter}) - }{% - \MakeUppercase\chaptername{}\ \thechapter. + \ifthechapter{% + \MakeUppercase\chaptertitlename\ \thechapter. }{% }% \chaptertitle% @@ -3305,20 +3301,7 @@ This work consists of the file yathesis.dtx % \begin{macro}{\YAD@section@header} % \begin{macrocode} \DeclareRobustCommand{\YAD@section@header}{% - \ifboolexpr{ - ( - ( - test {\ifnumcomp{\value{secnumdepth}}{>}{0}} - or - (not bool {YAD@nonnumbered@section}) - ) - and - test {\ifnumcomp{\value{chapter}}{>}{0}}) - and - (not bool {YAD@backmatter}) - and - (not bool {YAD@localbibs@used}) - }{% + \ifthesection{% \thesection. }{% }% @@ -3512,7 +3495,7 @@ This work consists of the file yathesis.dtx }% % \end{macrocode} % Pour que les bibliographies locales apparaissent automatiquement à chaque fin de -% chapitre, la commande "\chapter" est redéfinie de manière à commencer par +% chapitre, la commande "\chapter" est redéfinie de manière être précédée par % l'insertion de la bibliographie locale ("\printlocalbibs") du, donc, chapitre % précédent (affichée seulement si celle-ci n'est pas vide). Ceci fonctionne % bien, sauf : @@ -4083,7 +4066,8 @@ This work consists of the file yathesis.dtx % \end{macrocode} % \end{macro} % -% Si la commande "\maketitle" n'a pas été utilisée, une erreur est émise. +% Si la commande "\maketitle" n'a pas été utilisée, une erreur est émise (en +% version finale). % \begin{macrocode} \AtEndDocument{% \ifboolexpr{% @@ -4101,6 +4085,11 @@ This work consists of the file yathesis.dtx }% % \end{macrocode} % +% Le mémoire est, à son début, automatiquement en style de pages préliminaires. +% \begin{macrocode} +\AfterEndPreamble{\pagestyle{preliminary}}% +% \end{macrocode} +% % Code pour l'éventuel colophon % \begin{macrocode} \newcommand{\YAD@insert@colophon}{% @@ -5105,11 +5094,18 @@ This work consists of the file yathesis.dtx % or local) TOCs. For this, it is enough to \enquote{relax} "\addcontentsline". % \begin{macrocode} \renewcommand\addcontentsline[3]{}% - \section *{\kern\dimen@ % \dimen@ works here by sheer luck - % \contentsname% - % \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}% - \large\textbf{\translate{lbl-localtocname}}% + \begingroup + \titlespacing*{\section}{\dimen@}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex} + \section*{% + \large% + \translate{lbl-localtocname}% }% + \endgroup +% \end{macrocode} +% We don't want the header contain the title of the previous (dummy) section in case +% the first \enquote{real} section shows up. +% \begin{macrocode} + \sectionmark{}% % \end{macrocode} % We restore the original behavior of "\addcontentsline". % \begin{macrocode} @@ -5286,11 +5282,31 @@ This work consists of the file yathesis.dtx \ifbool{YAD@localbibs}{% \ifbool{YAD@localbibs@used}{% }{% - \let\YAD@ORI@blx@warn@bibempty\blx@warn@bibempty% - \def\blx@warn@bibempty{}% - \YAD@printbibliography@ORI[segment=\therefsegment,heading=YAD@localbibs@heading]% - \let\blx@warn@bibempty\YAD@ORI@blx@warn@bibempty% - \booltrue{YAD@localbibs@used}% +% \end{macrocode} +% \end{environment} +% +% On n'affiche une bibliographie locale que dans les segments de bibliographie +% autres que celui numéroté 0 sans quoi la bibliographie globale est suivie +% d'une bibliographie locale contenant toutes les citations insérées en dehors +% d'un segment (par exemple en cas de ×\nocite{*}× ou de citation par exemple +% dans les épigraphes). +% \begin{macrocode} + \ifnumcomp{\value{refsegment}}{=}{0}{% + }{% + \let\YAD@ORI@blx@warn@bibempty\blx@warn@bibempty% + \def\blx@warn@bibempty{}% +% \end{macrocode} +% Les bibliographies locales sont composées en interligne simple +% \begin{macrocode} + \bgroup + \par% + \singlespacing% + \YAD@printbibliography@ORI[segment=\therefsegment,heading=YAD@localbibs@heading]% + \par% + \egroup% + \let\blx@warn@bibempty\YAD@ORI@blx@warn@bibempty% + \booltrue{YAD@localbibs@used}% + }% }% }{% }% @@ -6002,7 +6018,8 @@ This work consists of the file yathesis.dtx % \begin{macrocode} \AtEndPreamble{% \@ifpackageloaded{biblatex}{% - \defbibheading{YAD@localbibs@heading}[\translate{lbl-localbibname}]{% + \defbibheading{YAD@localbibs@heading}[\translate{lbl-localbibname} % (\therefsegment) + ]{% \renewcommand\addcontentsline[3]{}% \section*{#1}% \let\addcontentsline\YAD@addcontentsline% @@ -6024,20 +6041,26 @@ This work consists of the file yathesis.dtx \let\YAD@printbibliography@ORI\printbibliography% \renewcommand{\printbibliography}[1][]{% \booltrue{YAD@printbibliography@used}% + \bgroup + \par% + \singlespacing% + \YAD@printbibliography@ORI[#1]% % \end{macrocode} % -% Un hack aimablement fourni par samcarter -% (\url{https://texnique.fr/osqa/questions/6977/header-avec-biblatex/6978}) -% a permis d'éviter que l'entête de la bibliographie, en dernière page de -% celle-ci, ne contienne pas seulement \enquote{Bibliographie} mais -% \enquote{CHAPITRE XXX. Bibliographie}. +% On introduit un segment de bibliographie vide sans quoi la bibliographie est +% suivie de la bibliographie locale du chapitre précédent (quand il en a une), +% avec en outre un titre courant incorrect sur les pages paires +% (\enquote{CHAPITRE (ou ANNEXE) XXX. Bibliographie du présent chapitre}). % \begin{macrocode} - \singlespace% - \chapter*{\bibname}% - \YAD@printbibliography@ORI[heading=none,#1]% - \endsinglespace% + \newrefsegment% + \endrefsegment% + \egroup% }% }{% +% \end{macrocode} +% +% Si \package{biblatex} non chargé (\package{bibtex} supposé). +% \begin{macrocode} \BeforeBeginEnvironment{thebibliography}{% \singlespacing% }% @@ -6049,6 +6072,18 @@ This work consists of the file yathesis.dtx % \end{macrocode} % \end{macro} % +% On s'assure que, en fin de document, les \enquote{chapitres} et +% \enquote{section} sont non numérotés afin d'éviter sur la (ou les ?) +% dernière(s) page(s) des titres courants incorrects (comportant +% \enquote{Chapitre XXX. ...} ou \enquote{XXX.XXX} qui ne devraient pas +% apparaître si le dernier chapitre du document est non numéroté). +% \begin{macrocode} +\AtEndDocument{% + \booltrue{YAD@nonnumbered@chapter}% + \booltrue{YAD@nonnumbered@section}% +} +% \end{macrocode} +% % Si la commande "\printbibliography" n'a pas été utilisée, une erreur est émise. % \begin{macrocode} \AtEndDocument{% @@ -6509,7 +6544,7 @@ This work consists of the file yathesis.dtx #include:setspace #include:tcolorbox #include:textcase -#include:titleps +#include:titlesec #include:tocbibind #include:translator #include:twoopt @@ -6562,7 +6597,7 @@ adjustbox setspace xcolor datatool -titleps +titlesec draftwatermark babel datetime -- cgit v1.2.3