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 would like to use the "dictionary" style of page header, using \rightmark--\leftmark as suggested in fancyhdr package.

However, in twocolumn mode, \rightmark containts the first mark in the latter column, which is wrong: it should contain the first mark in the former column.

I know that using multicol package instead of [twocolumn] option or \twocolumn command would help, but I would like to avoid multicol.

Here is a MWE:

\documentclass[twocolumn]{article}

\usepackage{fancyhdr}
\fancyhf{}{}
\fancyhead[R]{\thepage}
\fancyhead[L]{\rightmark{} -- \leftmark}
\pagestyle{fancy}

\def\mysection#1{\section*{#1}\markboth{#1}{#1}}

% to provide dummy text and lots of sections
\usepackage{lipsum}
\newcounter{xs}
\def\xsect{%
  \stepcounter{xs}%
  \mysection{Section \Alph{xs}}
  \lipsum[\value{xs}]
}

\begin{document}

\xsect\xsect\xsect\xsect\xsect
\xsect\xsect\xsect\xsect\xsect

\end{document}
share|improve this question
add comment

1 Answer

up vote 6 down vote accepted
\usepackage{fixltx2e}

12345678

share|improve this answer
add comment

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.