# Getting the current page in plain TeX

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.

-

``````\number\pageno
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`