Page LayoutHow to add custom numbering - e.g. COVER, or Page #

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
RiW
Posts: 29
Joined: Wed Sep 01, 2010 12:11 am

How to add custom numbering - e.g. COVER, or Page #

Post by RiW »

Hi,

I'm finalising a report and have managed to nicely number the main report in arabic and the abstract & contents in roman form. However, I'd like the front cover to simply display "COVER" in the page number field when viewed as a PDF.

I've seen this done for eBooks and other documents but despite extensive searching for suitable code / a package I can't find a way to do it in Latex.

Does anyone have any ideas?

Thanks!
Last edited by RiW on Wed Sep 15, 2010 11:02 am, edited 1 time in total.

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

west.logan
Posts: 87
Joined: Tue Sep 14, 2010 6:58 pm

Re: How to add custom numbering - e.g. COVER, or Page #

Post by west.logan »

One way it could be done (though I don't know if it's the best) is using the fancyhdr package. Define
\cfoot{COVER}
and then say
\thispagestyle{fancy}
for the title page. If it shows a right foot page number you don't want (for example) then you can do \rfoot{} to make it empty.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

How to add custom numbering - e.g. COVER, or Page #

Post by meho_r »

@west.logan, I don't think RiW had that in mind, but word "Cover" should appear in page number field in a PDF viewer, not on the page itself.

@RiW, if you don't need a page number on title page, then one way would be to simply redefine \thepage counter, e.g.:

Code: Select all

\documentclass{report}

\usepackage{lipsum}
\usepackage{hyperref}

\begin{document}

\renewcommand{\thepage}{Cover}
\thispagestyle{empty}
{\Huge Title page}

\clearpage
\pagenumbering{roman}

\chapter{A chapter}

\lipsum[1-2]

\section{A section}

\lipsum[1-2]

\clearpage
\pagenumbering{arabic}

\chapter{Another chapter}

\lipsum[1-2]

\section{Another section}

\lipsum[1-2]

\end{document}
west.logan
Posts: 87
Joined: Tue Sep 14, 2010 6:58 pm

Re: How to add custom numbering - e.g. COVER, or Page #

Post by west.logan »

Ah yes, I believe you are correct. Thanks!
RiW
Posts: 29
Joined: Wed Sep 01, 2010 12:11 am

How to add custom numbering - e.g. COVER, or Page #

Post by RiW »

Thanks for both your suggestions. My problem was, as meho_r suggested, solved rather nicely by this line.

Code: Select all

\renewcommand{\thepage}{Cover}
So many thanks!
Post Reply