Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing my thesis with scrartcl, using the KOMAoption abstract=true. My abstract has two pages, and while on the 1st page, the pagestyle is empty, on the 2nd page of the abstract all the additional elements (headsepline, footsepline, page number, heading) are shown. The whole text of the abstract is written within the abstract environment. Here is an MWE:

\documentclass[oneside]{scrartcl}

\KOMAoptions{titlepage=true, abstract=true}

\usepackage[automark]{scrpage2}
\pagestyle{scrheadings} 
\chead[]{}
\ihead[]{}
\lehead[]{}
\ohead{\headmark}
\setheadsepline{.6pt}
\setfootsepline{.6pt}

\usepackage{lipsum}

\begin{document}

\title{My Thesis}
\author{It's me}
\maketitle

\thispagestyle{empty}
\addsec{Plagiarism Statement}
I'm not a plagiarist     \newpage

\begin{abstract}    
\lipsum
\end{abstract}

\end{document} 

I'd like the second page of the abstract to have the same layout as the first one (probably keeping the headings would be better, but I'm not sure yet). I don't understand why the pages are different now as the abstract text is enclosed within the same environment. Does anyone have an idea?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Use \pagestyle{scrheadings} after end{abstract} and you will get no headings for the title and abstract pages.

If you want to get headings at the abstract page you can patch the environment abstract with \etoolbox:

\usepackage{etoolbox}
\patchcmd\abstract{\titlepage}%
  {\titlepage
    \thispagestyle{scrheadings}%
   \markboth{\abstractname}{\abstractname}%
 }{%
  \typeout{*******patching \string\abstract\space done*******}%
 }{%
  \typeout{*******patching \string\abstract\space fails*******}%
}

The command \markboth is need to get the correct heading.

\documentclass[oneside]{scrartcl}

\KOMAoptions{titlepage=true, abstract=true}

\usepackage[automark]{scrpage2}
\pagestyle{scrheadings} 
\chead[]{}
\ihead[]{}
\lehead[]{}
\ohead{\headmark}
\setheadsepline{.6pt}
\setfootsepline{.6pt}

\usepackage{lipsum}
\usepackage{etoolbox}
\patchcmd\abstract{\titlepage}%
  {\titlepage
    \thispagestyle{scrheadings}%
   \markboth{\abstractname}{\abstractname}%
 }{%
  \typeout{*******patching \string\abstract\space done*******}%
 }{%
  \typeout{*******patching \string\abstract\space fails*******}%
}


\begin{document}



\title{My Thesis}
\author{It's me}
\maketitle

\thispagestyle{empty}
\addsec{Plagiarism Statement}
I'm not a plagiarist
\clearpage
\begin{abstract}    
\lipsum
\end{abstract}
\section{foo}
\lipsum
\end{document} 
share|improve this answer
    
The problem aren't the headings after the abstract. The problem is that the first page of the abstract has an empty style, while the second page of the abstract has headings. Adding \pagestyle{scrheadings} before begin{abstract} doesn't add headings to the first page of the abstract, while adding \thispagestyle{empty} before \begin{abstract} doesn't remove the headings on the second page. So no matter what I add before the beginning of the abstract, the two pages remain different. (btw: I changed the mwe using lipsum, thanks for the hint) –  AnjaM May 20 '12 at 17:11
    
@AnjaM: Do you want a header at the first page? –  Marco Daniel May 20 '12 at 17:21
    
I am tempted to keep the header on both pages. However, if it's not too difficult, I would prefer to try out both options to see what looks better at the end. –  AnjaM May 20 '12 at 17:28
    
@AnjaM: I edited my answer. –  Marco Daniel May 20 '12 at 17:35
    
Thanks, the one with etoolbox works! Could you please explain why you need the typeout commands? However, the second suggestion (to use \pagestyle{scrheadings} after end{abstract} ) didn't remove the headings from the second page of the abstract. –  AnjaM May 20 '12 at 17:44
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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