5

I know that TeX does not update the page number until it can decide where to break a page. And when I write

\number\count0

\number\count0

\number\count0
% ...

to fill two pages, the second page of the output begins with

1
1
2
2
2
...

Therefore, if something appears on the top of a page, then I can't get the correct page number for it. In LaTeX we have \label and \pageref as a workaround. But is there a way to do this in plain TeX?

6

Yes of course you could implement the same system latex uses, with a two-pass writing to the aux file. You could define some macros just to do this or more simply

\input eplain

and use the eplain macros which provide various cross referencing features in a more plain style than the latex macros.

2

Yes of course you could implement the same system latex uses, with a two-pass writing to the auxiliary file. You could define some macros just to do this or more simply

\input opmac

and use the opmac macros \ref and \pgref which provide various cross referencing features in a more plain style than the latex macros.

  • This was cheap :( – morbusg Jun 29 '17 at 21:18

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.