4

I am having a problem with the scrbook class. Since I am quite new to it I spent quite some time researching but somehow haven't found a way to resolve it. I am trying to write a LaTeX document for uni and would like to have headers and footers on each page. The essential lines in my document are as follows:

\documentclass[10pt,twoside,a4paper,fleqn,ngerman]{scrbook}

\usepackage[utf8]{inputenc}

\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm, includeheadfoot]{geometry}

\usepackage[automark,headsepline]{scrpage2}

\deftripstyle{pagestyle}[0.5pt][0.3pt]{\pagemark}{}{\titleinfo}{\pagemark}{\today}{\authorinfo}
\pagestyle{pagestyle}


\newcommand{\titleinfo}{Model}
\newcommand{\authorinfo}{D. Wright}

\begin{document}

\chapter{Chapter}

\end{document}

Somehow it doesn't seem to work. I get the following output: test file

When I change the \documentclass to article or scrartcl I do get the headers and footers on each page but not in book, or scrbook (which would be the one that I would like to work with). Can anybody help me out?

6

As explained in section 3.12 of the KoMaScript manual, chapter starting pages use the \chapterstyle page style and the default meaning of \chapterstyle is plain. Just renew the meaning:

\documentclass[10pt,twoside,a4paper]{scrbook}

\usepackage[utf8]{inputenc}

\usepackage[
  left=1cm,
  right=1cm,
  top=1cm,
  bottom=1cm,
  includeheadfoot
]{geometry}

\usepackage[automark,headsepline]{scrpage2}

\usepackage{kantlipsum}

\deftripstyle{pagestyle}
  [0.5pt]
  [0.3pt]
  {\pagemark}
  {}
  {\titleinfo}
  {\pagemark}
  {\today}
  {\authorinfo}

\pagestyle{pagestyle}
% use "pagestyle" also on chapter starting pages
\renewcommand{\chapterpagestyle}{pagestyle}


\newcommand{\titleinfo}{Model}
\newcommand{\authorinfo}{D. Wright}

\begin{document}

\chapter{Chapter}

\kant
\end{document}

(The kantlipsum package is just for providing mock text.)

enter image description here

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.