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 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

share|improve this question
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

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

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