Menu

#4 Package scrlayer-scrpage and \pagestyle{headings}

KOMA-Script 3.34
closed
2021-06-03
2021-03-29
tudscr
No

Using \pagestyle{headings} after package scrlayer-scrpage with scrrerpt gives not the same result as without package scrlayer-scrpage at all. Is this on purpose?

\documentclass{scrreprt}
%\usepackage{scrlayer-scrpage}
\pagestyle{headings}
\usepackage{blindtext}
\begin{document}
\blinddocument
\blinddocument
\end{document}

Related

Issues: #32

Discussion

  • Markus Kohm

    Markus Kohm - 2021-03-29

    Yes it is. scrlayer-scrpage automatically activates pagestyle scrheadings. scrheadings is a page style pair consisting of page styles scrheadings and plain.scrheasings. scrheadings is the so called main (or headings) page style and plain.scrheadings is the plain page style. Every such pair makes headings an alias of the main page style and plain an alias of the plain page style. This is a documented feature.

    So \pagestyle{headings} activates only the (already selected) main page style of scrheadings. And because you've neither uses option automark nor manualmark the mark mechanism is not influenced by loading scrlayer-scrpage. And because scrreprt does not use automatic marks by default, here scrheadings behaves like myheadings.

    See also in user guide:

    Note that merely loading the package does not have any effect on whether automatic or manual running heads are used, or what kind of sectioning headings fill the marks. Only by explicitly using the option automark or manualmark, or the command \automark or \manualmark, will the conditions here be initialized.

    This is the reason why I recommend to always use either option automark or manualmark or one of the commands \automark or \manualmark explicitly.

     

    Last edit: Markus Kohm 2021-03-29
  • Markus Kohm

    Markus Kohm - 2021-03-29
    • status: open --> closed
     
  • tudscr

    tudscr - 2021-03-29

    I'm totally fine with that. Just for completeness, using \pagestyle{headings} before scrlayer-scrpage gives a different result:

    \documentclass[twoside]{scrreprt}
    \pagestyle{headings}
    \usepackage{scrlayer-scrpage}
    \usepackage{blindtext}
    \begin{document}
    \blinddocument
    \blinddocument
    \end{document}
    
     
    • Markus Kohm

      Markus Kohm - 2021-03-29

      This is also intended and should be expected with my explanation above. With \pagestyle{headings} before loading scrlayer-scrpage you are activating a page style with automatic marks. And because

      merely loading the package does not have any effect on whether automatic or manual running heads are used, or what kind of sectioning headings fill the marks

      this is still active after loading scrlayer-scrpage.

       
      👍
      1
  • Markus Kohm

    Markus Kohm - 2021-06-03
    • labels: --> scrlayer-scrpage
    • assigned_to: Markus Kohm
     

Log in to post a comment.