TransWikia.com

Section in Header without number in unnumbered section

TeX - LaTeX Asked by Msegade on September 24, 2020

I’m trying to get the section name without the number in the header using fancyheader. It works if I use a numebered section, but if I don’t want the section number in the document (section*{Section Name} ) the header disappears.
MWE:

documentclass{article}

usepackage{fancyhdr}
usepackage{extramarks}
usepackage{lipsum}

pagestyle{fancy}
renewcommand{sectionmark}[1]{uppercase{markright{#1}}}

rhead{rightmark}
lhead{}
cfoot{thepage}

begin{document}

section*{First Section}

lipsum[1-20]

end{document}

One Answer

Use renewcommand{thesection}{}. It will register the name but not the number. Does that solve your problem?

Answered by Someone on September 24, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP