Changing header / footer in Front Matter - fancyhdr

hanmon's picture

Hi all,

This is my first post. So, I use Standard LaTeX Article as the document shell in SW 5 to write my thesis. I have searched the whole internet but cannot fix my problem.

I use the fancyhdr package to manage the header (I have no footer). The package manages the header for the entire document INCLUDING the front matter. I know that if you want to change (not suppress entirely) the header on a certain page you have to insert an encapsulated tex field in the body of the text reading, for example:

\lhead{\nouppercase \rightmark}

This works fine, but only for the BODY of the text. I want to change the header in the table of conents and the list of figures, i.e., I want to change the header in the FRONT MATTER.
I have no clue how this works. Inserting the same encapsulated texfield in the Front Matter window (Typeset --> Front Matter) will not show any effect, neither inserting it at the beginning of (or anywhere in ) the body of the text.

Currently, I have the section heading in the left corner, but after pdf previewing this looks stupid in, e.g, the table of contents as it will say “contents” in the upper left header and “contents” again right below the that in the text indicating that one is currently reading the contents section. Which is why I want to edit the header in the front matter only.

I thank you guys in advance,


hanmon's picture

 Hi all, I could not come up

 Hi all,

I could not come up with an answer myself, so I decided to circumvent the problem and do it manually, i.e. created a customized title page. There, I was able to change the header and footer information for both the TOC and the LOF, here is the TexField I entered following the manual title page in the body of the text (at the very beginning of the document, obviously):




\tableofcontents \newpage


\listoffigures \newpage

This works fine. 

Now, however, I have a new question. Is there a way to manually change the spacing in the list of figures between the heading reading "List of Figures" and the first entry from the list (I know how to increase the distance from the top of the document, but then "List of Figures" and the first entry still have the same distance between them.


In my attached document, I would like to increase the distance between "List of Figures" and "1.1  The issue-invest decision faced by managers at t=0".


I would be highly grateful for any advice.


Take care





The "List of Figures" heading

The "List of Figures" heading is an unnumbered section.  If you want to change the distance after the section heading and the following text, this should be done for all of the sections in the document.  Making the change will depend on the typesetting specification being used.  The section formating is controlled in article.cls by:

\newcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%

Details of the \@startsection macro can be found by reading the LaTeX source code, and in the LaTeX Companion .  The macro has also been discussed on the comp.text.tex news group.  Following is some information on the macro from comp.text.tex:

 typeset section heading.
 #1<-section type ("section","subsection",...,"subparagraph")
 #2<-section level (1=>section, 2=>subsection, ..., 5=>subparagraph)
 #3<-indent of whole heading from left margin
 #4<-"beforeskip": absolute value is skip above heading; if value is
     negative, the paragraph indentation of text following heading is
 #5<-"afterskip"; if positive, then skip to leave below heading; if
     negative, absolute value is skip after title of run-in heading
 #6<-style for typesetting heading
 #7<-title for use in running heads, table of contents (default value
     is as #8)
 #8<-title of section

If you want to make a change, you could add something like the following to your document preamble:

\renewcommand\section{\@startsection {section}{1}{\z@}{-3.5ex 
\@plus -1ex \@minus -.2ex}{3.3ex \@plus.2ex}{\normalfont\Large\bfseries}}

It is the fifth parameter that controls the spacing after the heading, so in the above example I added 1ex to this distance.

hanmon's picture

 Hi George, thanks a lot for

 Hi George,

thanks a lot for the reply. I was going to post this anywas, as I found another way to do it yesterday. Don't get me wrong, your answer is much appreciated.

I intended to change the distance between section heading "list of figures" and the text only for the list of figues. In order to do so, I found out that all you have to do is to add the line \addtocontents{lof}{\vskip0.65cm} (where the number governs the vertical distance) to the (encapsulated) TexField that governs the manual inclusion of the LoF, such that the entire TexField - which is located after the title page body text - now reads:



\tableofcontents \newpage
\listoffigures \newpage
This worked fine. Thanks again


There are sure to be other

There are sure to be other ways to make this change, and what you've done works.  From a design perspective, the change shouldn't be done since it makes the lof inconsistent with the other similar elements in the document.  You must be working on a disseration where there are often silly document design requirements.  :-)

hanmon's picture

 Hi Geroge,   it was quite

 Hi Geroge,


it was quite the opposite, actually. While I found the automated space between the heading "Contents" and the first entry alright looking, I found that the same did not hold true for the heading "List of Figures". It is sort of weired, now that you mention it. It just did not look right, I still think it looks way better now. So, it has nothing to do with the requirements.

Thanks for your comments,