The code that I use for the header and footer in the article format is as follows:


\lhead{Project tile}
\rfoot{Page \thepage}

The problem is that this also prints the formatting that I've put to the section name to make it stand out:


This just increases the size, and makes the section name bold. So how do I put the current section name in the footer, without the footer name also being big and bold.

2 Answers 2


You're following the wrong approach. You should avoid setting sectional formatting inside the title, since this would make its way into the marks (typically used in headers/footers) and also the ToC, which is not ideal.

Instead, use something like sectsty to format your sectional fonts (see Change size of section, subsection, subsubsection, paragraph and subparagraph title):

enter image description here


\sectionfont{\LARGE\bfseries}% https://tex.stackexchange.com/q/59726/5764

\lhead{Project tile}
\rfoot{Page \thepage}

  \markboth{\ifnum \c@secnumdepth>\z@
      \thesection\hskip 1em\relax
    \fi #1}{}}





Above I also updated the \sectionmark macro to avoid inserting \MakeUppercase as part of the default construction. You can remove that if necessary.

  • Unfortunately I can't use a table of contents for the project that I'm doing, e.g. its just the section name and then the text. So how would I change the code above to do that. Also what does the code between \makeatletter and \makeaother do?
    – UniStuffz
    Nov 6, 2016 at 19:45
  • @UniStuffz: You can just remove \tableofcontents. I added it just to show that the formatting of the section title doesn't transfer into the ToC. The \makeatletter...\makeatother pair allows the use of @ inside macro names - something that is typically reserved for low-level programming. See What do \makeatletter and \makeatother do?
    – Werner
    Nov 6, 2016 at 19:50
  • this worked perfectly thank you, usually I stay over at maths stack exchange, but thanks for answering my first question here.
    – UniStuffz
    Nov 6, 2016 at 20:28

If you use a KOMA-class (scrartcl and so on) you can accomplish this without fancyhdr and with scrlayer-scrpage.



\setkomafont{section}{<formatting>}% changes the formatting of headlines

\ihead{Project title}
\chead{}% if you leave this out the pagehead will contain the sectionnames, too
\ifoot{\headmark}% the i is for inner side of the page if you use twoside and left side if you use oneside
\cfoot{}% if you leave this out the pagenumber will be in the center, too
\ofoot{Page \pagemark}


You might use \cfoot or \ofoot as an alternative to \ifoot. If you want those to be in the head just use \ihead, \chead or \ohead.

EDIT: Added the head- and footsepline.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .