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