[comp.text.tex] LaTeX page numbering

graeme@abekrd.UUCP (Graeme Griffiths) (11/08/90)

Can anyone help,

	I'm creating a standard document generator using a shell script that
drives LaTeX. On the first page of the document I have the total number of
pages in the document.I have done this by setting a label right at the end of 
the document and \pageref ing to it at the start.This works O.K with two
passes but, I would like to prompt for added (i.e non LaTeX generated) pages
and have that added to the number on the first page.This seems alright until
I refer to my label as a value (lots of errors)

	I've tried using the LaTeX counter page , no errors but it never changes
from 0.

	If this makes any sense to anyone please mail me suggestions before I
eat my workstation in frustration.

				Cheers.


-------------------------------------------------------------------------------
| From Graeme Griffiths ( graeme@abekrd.co.uk )					      |
| R&D Dept, Abekas Video Systems Ltd, 12 Portman Road, Reading, Berks RG3 1EA |
| Tel. 0734 585421 extn 2248.                                             	|
|                                                                             |
|     "Ever noticed that lif is one big pile of bulls**t                      |
|       And everybody seems to be out for a little piece of everyone elses    |
|      Well I've got some advice, get yourself a big old 45                   |
|       And blow your troubles away!" Enuff Z'Nuff                            |
-------------------------------------------------------------------------------

eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) (11/09/90)

graeme@abekrd.UUCP (Graeme Griffiths) writes:

>	I'm creating a standard document generator using a shell script that
>drives LaTeX. On the first page of the document I have the total number of
>pages in the document.I have done this by setting a label right at the end of 
>the document and \pageref ing to it at the start.This works O.K with two
>passes but, I would like to prompt for added (i.e non LaTeX generated) pages
>and have that added to the number on the first page.This seems alright until
>I refer to my label as a value (lots of errors)

The page number is stored in \count0. While it's not exactly
proper LaTeX, you could just \advance\count0 by ...
after you have output the last regular page (use \vfil\eject
if necessary). This will generate one spurious page which you
then have to throw in the garbage bin. Litterally.

Lacking more detailed information this is the best I can suggest.

V.