Using \newpagestyle I wanted to put the section title in the page header. However on the 1st page with the first section I have the header of the second section, as the example shows:








\framebox{We have here header ``Due''. WHY?}









  • The header is updated before LaTeX decides that the section needs to be put on a new page. – Johannes_B Dec 18 '16 at 13:27
  • 1
    Is your only purpose to get unnumbered section headings? – Johannes_B Dec 18 '16 at 13:27
  • How to correct this situation? The hard-page seems to be rather strange solution. – zeta0 Dec 18 '16 at 15:10
  • 1
    The second comment of me was much more important. If you are only after unnumbered headings, the solutions is amazingly simple. – Johannes_B Dec 18 '16 at 15:18
  • I want to have more complex header than in the example code. This is the minimum which makes problems. – zeta0 Dec 18 '16 at 20:33

That's why there are marks. These pick up information at the time the page is built.

Here is a solution with fanchdr. [Actually I would suggest not to redefine your own section command, but I just kept it.]






The rest is the same.

| improve this answer | |
  • Thank you. However the fancyhdr not always work fine. \markright with titlesec is strange. Is there any simple solution for the titlesec? – zeta0 Dec 18 '16 at 20:30
  • I don't know. Do you have an example where it is strange? – Pieter van Oostrum Dec 18 '16 at 21:04

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.