I would like to include the section name of the page's displayed section in my header tags in the fancyhdr package, something like
\fancyhf[HR]{SECTION NAME}
\fancyhf[HL]{SUBSECTION NAME}
How can I go about doing this?
fancyhdrheader-footer
I would like to include the section name of the page's displayed section in my header tags in the fancyhdr package, something like
\fancyhf[HR]{SECTION NAME}
\fancyhf[HL]{SUBSECTION NAME}
How can I go about doing this?
Best Answer
titleps
provides this out-of-the-box and is not that different in interface/usage fromfancyhdr
. You might be interested in readingtitleps
forfancyhdr
users.If you wish to do this straight with
fancyhdr
, you'll have to patch the sectional unit constructions to store the titles, or use the title marks with some massaging.You would use
Here's a very minimal example with the addition of the sectional unit number as well: