4

I am looking to make a page that has in the header

chapter chapter num -------------------------chaptertitle

for both odd and even pages.

Any pointers? Can someone explain how a sectionmark gets displayed in the header? And how to change the rightmark? thank you

  • 1
    It depends on which classes and packages you're using. Please tell us the class, the page style and packages you load for headings (fancyhdr or scrpage2?) The best would be a small compilable example. – Stefan Kottwitz Dec 6 '10 at 19:38
3

This is very easy with titlesec. See code below for a basic structure.

\documentclass[11pt,a4paper,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=3cm]{geometry}
\usepackage[pagestyles,raggedright]{titlesec}
\usepackage{blindtext}

\newpagestyle{main}{%
  \headrule
  \sethead[\chaptername\ \thechapter][][\chaptertitle]{\chaptername\ \thechapter}{}{\chaptertitle}
  \setfoot[\thepage][][]{}{}{\thepage}
}
\pagestyle{main}

\begin{document}
    \Blinddocument
\end{document}

As always, the blindtext package is only for creating dummy text thus not part of the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy