I am writing a document in the book class. I am looking for a way to produce the following.

In one of my chapters, the sections carry a name, each of which can be summed up by only a few letters, for instance 'AA' or 'BC2'. Instead of the usual headings, I want each page to carry (in big size) the title of the section in the upper part of the page, on the left or on the right depending whether the page number is even or odd.

I have looked in the fancyhdr documentation, but I haven't found a way to produce such a result so far.

  • Can you please post the code for what you have tried so far? – JohnReed Apr 29 '12 at 22:23
  • Well, the point is that I have no such code because I have no idea how to do so. – Thomas Connor Apr 29 '12 at 22:57
  • By "upper part of the page" you mean the header? Is there enough space for the large font size you desire? And what's the problem with fancyhdr exactly? That you want this only for one particular chapter? – Christian Apr 29 '12 at 23:03
  • By upper part of the page, I mean close to the corner of the page (but I admit I want to stay a little vague on it since I am looking for a general solution instead of an answer to a particular technical problem). One of my problem with fancyhdr is for instance that I do not know how to get rid of the number of the section. The thing is that the chapter will be quite big (more than 200 pages), and I want it to be very easy to find a desire section using the big letters in the corner of the pages. – Thomas Connor Apr 30 '12 at 8:45
  • @ThomasConnor Look at my answer. It gets rid of the section numbers and it makes the section name in the header \HUGE if you want (they are \Large right now but are easy to change as desired). – JohnReed Apr 30 '12 at 15:07

Here is one way to put the section names in the header by redefining the header styles for one chapter. It is a little bit crude, but if you are doing it for one chapter only it is probably fine. The relevant lines of code are commented for emphasis.

The default heading style in this example can be changed as required (as can the special heading style).

Here is an example in use:



\fancyhead[LE,RO]{\slshape \rightmark}
\fancyhead[LO,RE]{\slshape \leftmark}

\defaultheaders %SETS DEFAULT HEADERS

\chapter{chapter without special sections}

\chapter{chapter with special sections}
\fancyhead[RO,LE]{\Large\rightmark} % CHANGE \Large TO SOMETHING ELSE IF DESIRED


\chapter{another chapter without special sections}



  • The lipsum package and \lipsum commands are only present to show filler text


  • I had originally forgotten to make the heading font larger for the special chapter, the code has now been corrected to make the section names \Large

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.