J'ai changé (grâce à @touhami, ma question initiale ici) l'apparence des en-têtes des chapitres d'un manuscrit.
Cependant, depuis ce correctif, je constate que les bibliographies ne sont plus locales -- et plus préoccupant encore, elles sont présentes sur des éléments n'en ayant pas besoin, comme la table des matières ou les chapitres ne citant rien. Comme si un Voici un ECM qui illustre le problème : \documentclass[ mainlanguage=english, french, localtocs, localbibs*, secnumdepth=subsubsection, titlesec={pagestyles}]{yathesis} \usepackage{lipsum} \usepackage{geometry} \usepackage[ backend=biber, url=true, isbn=true, eprint=false, maxcitenames=10, maxnames=10, style=alphabetic, sortlocale=en_UK]{biblatex} \begin{filecontents}{bib.bib} @article{einstein, author = "Albert Einstein", title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German}) [{On} the electrodynamics of moving bodies]", journal = "Annalen der Physik", volume = "322", number = "10", pages = "891--921", year = "1905", DOI = "http://dx.doi.org/10.1002/andp.19053221004", keywords = "physics" } @book{dirac, title={The Principles of Quantum Mechanics}, author={Paul Adrien Maurice Dirac}, isbn={9780198520115}, series={International series of monographs on physics}, year={1981}, publisher={Clarendon Press}, keywords = {physics} } @online{knuthwebsite, author = "Donald Knuth", title = "Knuth: Computers and Typesetting", url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html", keywords = "latex,knuth" } @inbook{knuth-fa, author = "Donald E. Knuth", title = "Fundamental Algorithms", publisher = "Addison-Wesley", year = "1973", chapter = "1.2", keywords = "knuth,programming" } \end{filecontents} \addbibresource{bib.bib} \makeatletter \def\@makechapterhead#1{% \vspace*{0\p@}% (no extra top margin) {\parindent \z@ \centering \normalfont\sffamily % --- Chapter number line with colored text and rule --- \ifnum \c@secnumdepth >\m@ne \if@mainmatter \Huge\bfseries\color{gray}\@chapapp~\thechapter\par\nobreak \vskip -7\p@ % tighten spacing above the rule {\color{black}\rule{0.9\linewidth}{0.2pt}}\par % horizontal rule \vskip 7\p@ % space between rule and title \fi \fi % --- Chapter title line --- \LARGE\bfseries\color{blue} #1\par}% \vskip 30\p@ % space below chapter title % --- Insert leadchapter text, if provided --- \@ifundefined{YAD@leadchapter}{}{% \noindent\YAD@leadchapter\par \let\YAD@leadchapter\relax }% % --- Insert local chapter TOC, if enabled --- \ifbool{YAD@localtocs}{% \YAD@localtoc \renewcommand{\YAD@localtoc}{\YAD@default@localtoc}% \ifbool{YAD@nextwithlocaltoc}{% \boolfalse{YAD@localtocs}\boolfalse{YAD@nextwithlocaltoc}}{}% % (no extra gap here; adjust with \vskip if desired) }{}% \@afterheading \clearpage } \def\@makeschapterhead#1{% \vspace*{0\p@}% (no extra top margin) {\parindent \z@ \centering \normalfont\sffamily \LARGE\bfseries\color{red} #1\par}% \vskip 30\p@ % space below chapter title % --- Insert leadchapter text, if provided --- \@ifundefined{YAD@leadchapter}{}{% \noindent\YAD@leadchapter\par \let\YAD@leadchapter\relax }% % --- Insert local chapter TOC, if enabled --- \ifbool{YAD@localtocs}{% \YAD@localtoc \renewcommand{\YAD@localtoc}{\YAD@default@localtoc}% \ifbool{YAD@nextwithlocaltoc}{% \boolfalse{YAD@localtocs}\boolfalse{YAD@nextwithlocaltoc}}{}% % (no extra gap here; adjust with \vskip if desired) }{}% \@afterheading }\let\old@makechapterhead\@makechapterhead \AfterPreamble{% \patchcmd{\chapter}{{\YAD@starred@chapter}{\YAD@unstarred@chapter}}{{\let\@makechapterhead\@makeschapterhead\YAD@starred@chapter}{\let\@makechapterhead\old@makechapterhead\YAD@unstarred@chapter}}{}{\err} } \makeatother \geometry{ paper=a4paper } % \begin{document} \tableofcontents[depth=section] \mainmatter \chapter{Le premier} \lipsum{4} Ceci est une citation \cite{einstein} \cite{dirac} \chapter{Le deuxième} \lipsum{8} ici aussi une citation \cite{knuth-fa} \chapter*{Un test non num} \lipsum{6} \end{document} Est-ce qu'il existe une solution pour remédier à ce problème ? J'ai déjà (vainement) essayé de patcher les commandes de chapitres pour retirer la bibliographie. La seule chose qui fonctionne pour moi pour le moment est de retirer la ligne \patchcmd{\chapter}{{\YAD@starred@chapter}{\YAD@unstarred@chapter}} {{\let\@makechapterhead\@makeschapterhead\YAD@starred@chapter} {\let\@makechapterhead\old@makechapterhead\YAD@unstarred@chapter}}{}{\err} Mais ça me fait perdre la personnalisation des en-têtes de chapitres non numérotés, ce qui revient essentiellement dans mon cas (hors ECM) à avoir un saut de page non désiré entre le titre d'un chapitre non numéroté (comme le sommaire ou la bibliographie finale) et son contenu. |
La classe Pour le problème en question, disons que c'est de ma faute, il faut définir la commande |