Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 5
mineure

05 Aoû '17, 21:29

Pathe's gravatar image

Pathe
7.5k48207252

Voici une solution. On peut redéfinir le réglage de l’entête grâce à l'extension `fancyhdr`. Par exemple exemple : \fancypagestyle{mainmatter}{% \fancyhf{} \fancyhead[RE]{\slshape\leftmark} \fancyhead[LO]{\slshape\rightmark} \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0pt}} **Exemple compilable** \documentclass[space=onehalf, 12pt, twoside, a4paper]{yathesis} \usepackage{mwe} % just for the example \usepackage{fancyhdr} \fancypagestyle{mainmatter}{% \fancyhf{} \fancyhead[RE]{\slshape\leftmark} \fancyhead[LO]{\slshape\rightmark} \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0pt}} \begin{document} \mainmatter \blinddocument \blinddocument \blinddocument \end{document} ---------- **Mis à jour** suite aux commentaires de Bernard. Voici une autre solution. L'idée est d'utiliser la commande `\patchcmd` de l'extension `etoolbox` pour redéfinir les commandes internes `\ps@PAGESTYLE` \documentclass[space=onehalf, 12pt, twoside, a4paper]{yathesis} \usepackage{mwe} % just for the example \makeatletter \newcommand{\mtpatchcmd}[1]{% \expandafter\patchcmd\csname ps@#1\endcsname{\thepage}{}{}{}% \expandafter\patchcmd\csname ps@#1\endcsname{\thepage}{}{}{}} \renewcommand*{\YAD@setfoot}{\footrule\setfoot{}{\thepage}{}} \makeatother \mtpatchcmd{preliminary} \mtpatchcmd{ordinary} \mtpatchcmd{mainmatter} \mtpatchcmd{appendix} \mtpatchcmd{biblio} \mtpatchcmd{backmatter} \mtpatchcmd{contents} \mtpatchcmd{glossaire} \mtpatchcmd{index} \begin{document} \mainmatter \blinddocument \blinddocument \blinddocument \end{document}
cliquez ici pour masquer/afficher la révision 4

14 Jul '16, 15:06

touhami's gravatar image

touhami
9.8k410

Voici une solution. On peut redéfinir le réglage de l’entête grâce à l'extension `fancyhdr`. Par exemple \fancypagestyle{mainmatter}{% \fancyhf{} \fancyhead[RE]{\slshape\leftmark} \fancyhead[LO]{\slshape\rightmark} \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0pt}} **Exemple compilable** \documentclass[space=onehalf, 12pt, twoside, a4paper]{yathesis} \usepackage{mwe} % just for the example \usepackage{fancyhdr} \fancypagestyle{mainmatter}{% \fancyhf{} \fancyhead[RE]{\slshape\leftmark} \fancyhead[LO]{\slshape\rightmark} \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0pt}} \begin{document} \mainmatter \blinddocument \blinddocument \blinddocument \end{document} ---------- **Mis à jour** suite aux commentaires de Bernard. Voici une autre solution solution. L'idée est d'utiliser la commande `\patchcmd` de l'extension `etoolbox` pour redéfinir les commandes internes `\ps@PAGESTYLE` \documentclass[space=onehalf, 12pt, twoside, a4paper]{yathesis} \usepackage{mwe} % just for the example \makeatletter \newcommand{\mtpatchcmd}[1]{% \expandafter\patchcmd\csname ps@#1\endcsname{\thepage}{}{}{}% \expandafter\patchcmd\csname ps@#1\endcsname{\thepage}{}{}{}} \renewcommand*{\YAD@setfoot}{\footrule\setfoot{}{\thepage}{}} \makeatother \mtpatchcmd{preliminary} \mtpatchcmd{ordinary} \mtpatchcmd{mainmatter} \mtpatchcmd{appendix} \mtpatchcmd{biblio} \mtpatchcmd{backmatter} \mtpatchcmd{contents} \mtpatchcmd{glossaire} \mtpatchcmd{index} \begin{document} \mainmatter \blinddocument \blinddocument \blinddocument \end{document}
cliquez ici pour masquer/afficher la révision 3

14 Jul '16, 14:56

touhami's gravatar image

touhami
9.8k410

cliquez ici pour masquer/afficher la révision 2

14 Jul '16, 14:54

touhami's gravatar image

touhami
9.8k410

cliquez ici pour masquer/afficher la révision 1

13 Jul '16, 14:48

touhami's gravatar image

touhami
9.8k410

C'est votre première visite ici ? Consultez la FAQ !

×