home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / text / tex / 13405 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  1.2 KB

  1. Path: sparky!uunet!pipex!unipalm!uknet!pavo.csi.cam.ac.uk!camcus!cet1
  2. From: cet1@cus.cam.ac.uk (C.E. Thompson)
  3. Newsgroups: comp.text.tex
  4. Subject: Re: how many pages ?
  5. Message-ID: <1992Nov21.185025.568@infodev.cam.ac.uk>
  6. Date: 21 Nov 92 18:50:25 GMT
  7. References: <9211181717.AA08297@adelard.dcs.muni.cs> <rob.722273895@dutncp8>
  8. Sender: news@infodev.cam.ac.uk (USENET news)
  9. Organization: U of Cambridge, England
  10. Lines: 17
  11. Nntp-Posting-Host: grus.cus.cam.ac.uk
  12.  
  13. In article <rob.722273895@dutncp8>, rob@pact.nl (Rob Kurver) writes:
  14. |>
  15. |> While we're at the subject, how do I figure out the number of pages
  16. |> from within (La)TeX?  I want a cover page that indicates the number
  17. |> of pages to follow.
  18.  
  19. Simple in principle: use \label{last-page} on the last page and 
  20. \pageref{last-page} in your cover page, and apply LaTeX until convergence
  21. occurs. However, if you put the \label just before the \end{document}
  22. you may get a page break before the "whatsit" that \label generates, and
  23. in this case LaTeX's \output routine never sees it. It turns out to be
  24. necessary to weld the \label rather firmly to something that is actually
  25. printed (but is still guaranteed to be on the last page).
  26.  
  27. Chris Thompson
  28. JANET:    cet1@uk.ac.cam.phx
  29. Internet: cet1@phx.cam.ac.uk
  30.