## LaTeX forum ⇒ Page Layout ⇒ Unnumbered section names in header: problem with \markright Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
JefVL
Posts: 13
Joined: Sat Mar 22, 2014 10:27 pm

### Unnumbered section names in header: problem with \markright

Hi all,

I'm working on my thesis and there is a little issue that I can't seem to solve... I need to use unnumbered sections for my word of thanks and list of abbreviations, but I'd like the titles to show up in the header. I'm using the package "fancyhdr", which has already helped me a lot with my page numbering and my numbered sections, but for some weird reason these two unnumbered sections won't work properly. I've tried using the \markright{Word of thanks} command, but somehow it shows up on the left in the header. My list of abbreviations (which is right after my table of contents) does show up on the right, but it's showing "Contents" in the header instead of "Abbreviations". Any suggestions? Here's a MWE:

\documentclass[11pt,a4paper,oneside]{article} \usepackage{fancyhdr} \pagestyle{fancy}\setlength{\headheight}{15pt} \begin{document} \section*{Word of thanks\markright{Word of thanks}}  %% I've tried placing the \markright command on a separate line too, with no avail\thispagestyle{fancy}\cfoot[]{}    %% Using these two commands to prevent page numbering showing up in my footer\rfoot[]{}\newpage\tableofcontents\lhead[]{}\cfoot[]{}\rfoot[]{}\newpage\section*{Abbreviations\markright{Abbreviations}}\thispagestyle{fancy}\cfoot[]{}\rfoot[]{} \end{document}

EDIT: trimmed the MWE a bit
Last edited by JefVL on Wed Mar 26, 2014 12:04 am, edited 1 time in total.

JefVL
Posts: 13
Joined: Sat Mar 22, 2014 10:27 pm

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm
Here is a Suggestion:

\documentclass[a4paper]{article} \usepackage{fancyhdr} \pagestyle{fancy}\fancyhf{}\rhead{\leftmark}%\rfoot{\thepage}\setlength{\headheight}{15pt} \usepackage{blindtext} \begin{document} \section*{Word of thanks\markboth{\MakeUppercase{Word of thanks}}{}}\clearpage\tableofcontents \clearpage\section*{Abbreviations\markboth{\MakeUppercase{Abbreviations}}{}} \clearpage\blinddocument\end{document}

Best regards
Elke

JefVL
Posts: 13
Joined: Sat Mar 22, 2014 10:27 pm
Works like a charm, thanks a lot!