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.

It's possible to have pdfpages number the pages of the document it including using the following command:

\includepdfset{pagecommand=\thispagestyle{plain}}

(cf. Base document page numbers with pdfpages )

Unfortunately, this doesn't play nicely with nup (which puts multiple source pages on one target page); the numbering is applied to the output pages rather than the input pages:

\documentclass{article}
\usepackage{pdfpages}
\includepdfset{pagecommand=\thispagestyle{plain}}

\begin{document}
\includepdf[nup=2x3,pages={1-6},frame=true]{<use any PDF file>}
\end{document}

Cf. the '1' at the bottom of this, where I would want 1-6 on the pages:

enter image description here

Is there any way around this?

share|improve this question
1  
This is the expected output, so you'll have to change the way \thepage is printed in order to achieve the desired output. It will also have to be done somewhat manually, since the page numbers of the input document could be anything. That's just my opinion. –  Werner Dec 7 '12 at 20:54
    
@Werner: numbering 1-6 (regardless of the source numbering) would be fine. –  Mohan Dec 7 '12 at 21:00
    
Are you interested in referencing these page numbers 1-6? Not the included "nup"-ed pages, but the target page numbers? –  Werner Dec 7 '12 at 21:11
    
@Werner: I want to label the small 'nup'-ed pages 1-6. The context is that in the image in meta.tex.stackexchange.com/questions/2937/… , I realised one couldn't tell whether the "small" pages 1,2,3,4 went across or down -- having pdfpages number them would fix that. –  Mohan Dec 7 '12 at 21:18

1 Answer 1

up vote 3 down vote accepted

You could use two stages. The first stage just adds the page number, e.g.:

%%% test-stage1.tex %%%
\documentclass{article}
\usepackage{pdfpages}
\includepdfset{pagecommand=\thispagestyle{plain}}

\begin{document}
  \includepdf[fitpaper,pages={1-6}]{test-org.pdf}
\end{document}
%%% test-stage1.tex %%%

The next stage uses nup:

\documentclass{article}% set the correct paper size, default is letterpaper
\usepackage{pdfpages}

\begin{document}
  \includepdf[nup=2x3,pages={1-6},frame=true]{test-state1.pdf}
\end{document}
share|improve this answer

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.