Page LayoutCustomized Setup for Page Numbering

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
laailalalaa
Posts: 35
Joined: Thu Oct 27, 2011 5:31 pm

Customized Setup for Page Numbering

Post by laailalalaa »

Hello,

I'm changing a document class file. I want to display page numbering at the bottom of each page, starting with the first page. The page number should be horizontally centered. So far I came up with smth like this:

Code: Select all

\def\ps@headings{\let\@mkboth\@gobbletwo
\def\@oddfoot{\normalfont\small{\thepage}}
\def\@evenfoot{\normalfont\small{\thepage}}
,

but the page number does not appear on the first page. Also, the page number is aligned to the left.

Any ideas?
Thanks,

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Customized Setup for Page Numbering

Post by localghost »

laailalalaa wrote:[…] I'm changing a document class file. […]
Not a good idea. Unless you know exactly what you are doing.
laailalalaa wrote:[…][…] I want to display page numbering at the bottom of each page, starting with the first page. The page number should be horizontally centered. […]
Such settings are usually done by packages specially made for this purpose.
And actually \pagestyle{plain} should already do what you want.


Thorsten
Post Reply