0

I am using the document class scrreprt to set a chapter preamble (using \setchapterpreamble{}) as well as a header on the chapter start page. This usually works fine unless I introduce an abstract environment in the chapter preamble. In this case, no header is produced on the chapter start page, and no error is reported. Header is produced fine on the other pages. A MWE to reproduce the issue:

\documentclass[twocolumn,twoside,abstract=on]{scrreprt}
\usepackage{scrlayer-scrpage}
  \clearpairofpagestyles
  \newpairofpagestyles[scrheadings]{test999}{
  \KOMAoptions{headsepline=on}
  \KOMAoptions{plainheadsepline=on} 
  \lehead[plain.LEFT]{LEFT}
  \rehead[plain.RIGHT]{RIGHT}
  \lohead[plain.LEFT]{LEFT}
  \rohead[plain.RIGHT]{RIGHT}
  \cefoot{\pagemark} \cofoot{\pagemark}
  }

\pagestyle{test999}
\renewcommand*\chapterpagestyle{plain.test999}

\usepackage{fontspec}

\usepackage{lipsum}

\begin{document}
  \setchapterpreamble{\begin{abstract} \lipsum[1] \end{abstract}}
  \chapter{one}
    \section{one.one}
    \lipsum
\end{document}

Replacing or removing the abstract environment from the chapter preamble in the above code results in the header being produced correctly on the chapter start page.

I can use the quote environment to get around this temporarily, but would appreciate any help for a long term solution as I prefer to use the abstract environment.

1

It would be really better if you define a new environment. scrreprt uses option titlepage=on by default. With this option environment abstract excecutes \titlepage which includes a \thispagestyle{empty} ... If you set option titlepage=off the layout of the abstract changes.

While you could solve your problem by

\newcommand*{\originaltitlepage}{}
\let\originaltitlepage\titlepage
\renewcommand\titlepage{\originaltitlepage\thispagestyle{plain}}

or

\begin{abstract}\thispagestyle{plain} \lipsum[1] \end{abstract}

it is still a misuse of environment abstract.


Off topic: After \pagestyle{test999} the style name headings is an alias of test999 and plain is an alias of plain.test999. If you do not want to use plain.test999 as chapter page style with other pairs of page styles, you do not need to redefine \chapterpagestyle. Example:

\documentclass[twocolumn,twoside,abstract=on]{scrreprt}
\usepackage{scrlayer-scrpage}
  \clearpairofpagestyles
  \newpairofpagestyles[scrheadings]{test999}{
  \KOMAoptions{headsepline=on}
  \KOMAoptions{plainheadsepline=on} 
  \lehead[plain.LEFT]{LEFT}
  \rehead[plain.RIGHT]{RIGHT}
  \lohead[plain.LEFT]{LEFT}
  \rohead[plain.RIGHT]{RIGHT}
  \cefoot{\pagemark} \cofoot{\pagemark}
  }
\pagestyle{test999}

\usepackage{fontspec}
\usepackage{lipsum}

\begin{document}
  %\setchapterpreamble{\begin{abstract}\thispagestyle{plain} \lipsum[1] \end{abstract}}
  \chapter{one}
    \section{one.one}
    \lipsum
\end{document}
  • Thanks. This helps! I think I will define my own custom abstract environment. – latex_guy Sep 18 at 1:34

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.