![Centralizando a marca esquerda e direita do Fancyhdr](https://rvso.com/image/392324/Centralizando%20a%20marca%20esquerda%20e%20direita%20do%20Fancyhdr.png)
Gostaria de saber como foi possívelCentroas marcas de capítulos e seções (não sei se chamam assim) com este código (MWE)
\documentclass[10pt,twoside]{book}
\usepackage{lipsum}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[RE]{\leftmark}
\fancyhead[LO]{\rightmark}
\fancyhead[LE,RO]{\thepage}
\renewcommand\headrulewidth{0pt}
\renewcommand\chaptermark[1]{\markboth{\scshape#1}{}}
\renewcommand\sectionmark[1]{\markright{\scshape #1}}
\begin{document}
\chapter{chapter} % Even page header
\lipsum[1]
\section{section} % odd page header
\lipsum[1-5]
\end{document}
Responder1
Aqui está um código. Você se esqueceu de declarar o estilo da página como 'chique':
\documentclass[10pt,twoside]{book}
\usepackage{lipsum}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[CE]{\leftmark}
\fancyhead[CO]{\rightmark}
\fancyhead[LE,RO]{\thepage}
\renewcommand\headrulewidth{0pt}
\renewcommand\chaptermark[1]{\markboth{\scshape#1}{}}
\renewcommand\sectionmark[1]{\markright{\scshape #1}}
\pagestyle{fancy}
\begin{document}
\chapter{A First Chapter} % Even page header
\lipsum
\section{A section} % odd page header
\lipsum[1-10]
\end{document}
Editar: Se você quiser ter apenas os títulos nos cabeçalhos, é mais fácil com titleps
:
\documentclass[10pt,twoside]{book}
\usepackage{lipsum}
\usepackage{titleps}
\newpagestyle{mine}[\scshape]{%
\sethead[\thepage][\chaptertitle][]{}{\sectiontitle}{\thepage}
}
\pagestyle{mine}
\begin{document}
\chapter{A First Chapter} % Even page header
\lipsum
\section{A section} % odd page header
\lipsum[1-10]
\end{document}