13

Is there any command which is the opposite of \newpage/\pagebreak/\clearpage, i.e. which goes back a page instead of going forward, similarly to the way you can use \vspace to move the current vertical position in a page?

  • As standard: No. TeX/LaTeX assembles and then ships out one page at a time. After that there is no going back. You would have to start somewhere like writing a new output routine, which is not for the faint of heart. – Andrew Swann Jun 24 '13 at 8:18
14

No, there is sampage but that isn't what you want I suspect. The whole memory model of TeX is to ship out pages as fast as you can and to free up the memory. That is why even on the machines of 1982 TeX could produce documents of hundreds of pages. Once a page has been shipped out it has gone.

What you can do is collect more than one page worth of material in a box and then handle the box in some way before shipping it out.

  • So how can you create a chapter page with feature picture on the left-page? – Nicholas Hamilton Jun 24 '13 at 8:20
  • 1
    @ADP That doesn't require going back: you just do \clearpage, then if the page is odd do \mbox{}\clearpage so you are now on the even (left) page so do \includegraphics{zzz} then \clearpage gets you to the odd page and you can typeset the chapter head. – David Carlisle Jun 24 '13 at 8:23
  • got it, cheers. – Nicholas Hamilton Jun 24 '13 at 8:25
  • Great answer, that must be the reason why we need to run latex/pdflatex 2 or more times as well? – gerrit Jun 24 '13 at 17:11
  • @gerrit related yes, if you want information from the end of a run to affect the beginning (such as page numbers in table of contents) you either have to hold the entire document in memory (not an option at the time) or write the information out as you go along and then read it back in on the next run. – David Carlisle Jun 24 '13 at 17:48

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.