TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 5 down vote accepted

You can use


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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.