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

share|improve this question
    
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. –  tohecz Aug 23 '12 at 11:50

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
If you needed special treatment of page one so that it does not show 0--1, don't hesitate to request it! –  tohecz Aug 23 '12 at 11:51
    
fantastic! works very well! thank you! –  Shi Yuan Aug 23 '12 at 11:54

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.
http://tex.stackexchange.com/questions/68423/two-page-numbers-in-one-page?answertab=active
tex.stackexchange.com
crawl=CC-MAIN-2014-42
57638
application/http; msgtype=response
sha1:UUFC5LDM4ALXQ6WNIPEI6ZI7VSJOEFK4
<urn:uuid:3be06229-c6eb-4ac2-8a28-1063ea100534>
2014-10-23T11:21:23Z
198.252.206.16
sha1:J5GNRPYONPSTNQ6W245EW46JGWYVWGTZ
<urn:uuid:2dd9b7cc-e053-4360-af7c-acca4415ecc9>
http://tex.stackexchange.com/questions/68423/two-page-numbers-in-one-page?answertab=active
response
<urn:uuid:96d7a0d2-312d-4ab1-a457-74cc86efa8b7>
robots: classic
hostname: ip-10-16-133-185.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-42
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for October 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf