5

I am using LyX to layout a collection of essays.

There is one page-number-position per spread in the design. Please find the example below. Instead of showing 59, is it possible to show 58—59? I am using fancyhead to define the current example. my code as follow:

\renewcommand*{\chapterpagestyle}{fancy}
\fancyhead{}%
\fancyfoot{}%
\fancyhead[CE]{\rmfamily \small \leftmark}
\fancyhead[CO]{\rmfamily \small\thepage }
\fancyhead[RO, LE]{\rmfamily \small }
\renewcommand{\headrulewidth}{0pt}

Example of the task

  • I think it would be funny to display 58-59 on the right page. This would esentially mean that this page has two pagenumbers. Instead I would either drop the page number in the footer and use CO,CE as options for\thepage, or I'd push it in the margin, but again display it on both pages – Martin H Aug 23 '12 at 11:48
  • @TorbjørnT. I've used similar "dirty trick" before, and they do not anything when done correctly ;) Of course, you can use tempcntra to avoid manipulation with page counter, but it seems not ot be necessary. – yo' Aug 23 '12 at 11:50
3

You can change the corresponding line to

\fancyhead[CO]{%
  \rmfamily\small
  \addtocounter{page}{-1}%
  \thepage
  \addtocounter{page}{1}%
  --\thepage
}

We simply substract 1 from coutner page, print the page number, and add this 1 back so that we can print the current page number and we do not mess the page numbering.

  • If you needed special treatment of page one so that it does not show 0--1, don't hesitate to request it! – yo' Aug 23 '12 at 11:51

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.