4

What was the control sequence to get the current page in plain TeX? I thought it was \thepage, and this works in LaTeX, but it returns a undefined-control-sequence error in plain TeX.

5

You can use

\number\pageno

Third dangerous bend sign on page 252 of the TeXbook:

The page number appears in TeX’s internal register \count0, as explained in Chapter 15, and plain TeX makes \pageno an abbreviation for \count0. Thus you can say \pageno=100 if you want the next page of your output to be number 100. The \folio macro converts negative page numbers to roman numerals; if your manuscript begins with \pageno=-1, the pages will be numbered i, ii, iii, iv, v, etc. In fact, Appendix B defines \folio to be an abbreviation for \ifnum\pageno<0 \romannumeral-\pageno \else\number\pageno \fi

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.