I'm writing a scientific article. I found that the best option is to use the IEEEtran
document class:
\documentclass[conference]{IEEEtran}
But in this document the command
\pagenumbering
doesn't seem to do anything, and i cannot enumerate the pages.
How can i show page numbers in this document class?
Best Answer
The
\pagenumbering
macro does not actually force page numbers to be typeset. It only does two things. First, it governs the style of the page numbers, i.e, it determines whether the page numbers are typeset as arabic numerals, lowercase or uppercase Roman numerals, lowercase or uppercase alphabetic letters, etc. (Well, there is also\pagenumbering{gobble}
, which does render the page "numbers" invisible.) Second,\pagenumbering
resets thepage
counter variable to zero.The recognized options for
\pagenumbering
in the standard LaTeX document classes arearabic
,roman
,Roman
,alph
, andAlph
, Thealphalph
package provides two additional arguments:alphalph
andAlphAlph
, for numbering with two alphabetic characters, increasing the number of permissible page numbers from 26 to 26*26=576. Other packages and document classes may provided additional styles.The
IEEEtran
document class provides the following instructions (cf. lines 5631 ff. inIEEEtran.cls
):The
headings
page style, which is defined in the LaTeX kernel, places page numbers (and other pieces of information) in the header row.If the
IEEEtran
document class is loaded with the optionconference
, the macro\ifCLASSOPTIONconference
evaluates to 'true' and the following lines of code also get executed (cf. lines 2471 ff. inIEEEtran.cls
):That's why no page numbers are typeset if the
conference
class option is set.So, what to do if you do want to show page numbers?
If you wish to show the page numbers centered in the footer of the document, simply insert (a) the instruction
in the preamble and (b)
\thispagestyle{plain}
immediately after\maketitle
. (That's the instruction you'll find in several answers given to this posting.)If, however, you wish to typeset the page number at the left-hand edge of the header line, you should execute
If you need to show a page number on the very first page, I would recommend that you run
\thispagestyle{plain}
after\maketitle
, as it's customary to leave the header row blank on the first page of a document (or major division such as "chapter").