Page LayoutDisable page number in title page using fancyhdr

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
knasibas
Posts: 3
Joined: Mon Sep 13, 2010 7:26 pm

Disable page number in title page using fancyhdr

Post by knasibas »

Hi everyone!
I've noticed there are a lot of posts regarding page numbering, but I can't seem to find any solution to my problem.

As the topic says, I want to take away the page number from the title page while using the fancyhdr package. The point is that I want to start the counter at the next page. I'm not very familiar with the fancyhdr package itself, it's just that it has worked previously in creating simple title pages for me. However, if there's a smarter way of doing it, then I'm very open for suggestions!

This is what my code looks like so far:

Code: Select all

...
\usepackage{fancyhdr}
\title{...}
\author{...}

\begin{document}

\maketitle
\thispagestyle{fancy}
\rhead{\scriptsize\textit{some header I'm using}}
\renewcommand{\headrulewidth}{0pt}
Last edited by knasibas on Tue Sep 14, 2010 7:43 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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Disable page number in title page using fancyhdr

Post by meho_r »

First, please read Board Rules. Snippets of code usually aren't of any use and miss important infos like document class, for example. Always provide full Minimal Working Example (MWE).

Try this code and tell us what do you want changed exactly:

Code: Select all

\documentclass{report}

\usepackage[english]{babel}% needed for generating dummy text
\usepackage{blindtext}% generates some dummy text

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rhead{\scriptsize\textit{some header I'm using}}
\cfoot{\thepage}
\renewcommand{\headrulewidth}{0pt}

\title{A Title}
\author{The Author}

\begin{document}

\maketitle

\Blinddocument

\end{document}
knasibas
Posts: 3
Joined: Mon Sep 13, 2010 7:26 pm

Disable page number in title page using fancyhdr

Post by knasibas »

Thank you for the reprimand, I hope this post will clarify things.

What I want to do is to remove the page number completely from the title page and make the second page number one. I only want the header on the first page, which works with the code below so no changes there.

Edit: I should add that my output is a PDF-file (relevant?)

Code: Select all

\documentclass[a4paper,11pt,Final]{article}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{blindtext}

\title{A title}
\author{author}

\begin{document}

\maketitle

\thispagestyle{fancy}
\rhead{\scriptsize\textit{some header I'm using}}
\renewcommand{\headrulewidth}{0pt}

\newpage

\Blinddocument

\end{document}
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Disable page number in title page using fancyhdr

Post by meho_r »

No need for PDF file, the code you provided is enough. The key information was document class (I assumed report document class in my previous post). Try this:

Code: Select all

\documentclass[a4paper,11pt,Final]{article}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{blindtext}

\title{A title}
\author{author}

\begin{document}

\maketitle
\fancyfoot{}
\thispagestyle{fancy}
\rhead{\scriptsize\textit{some header I'm using}}
\renewcommand{\headrulewidth}{0pt}

\newpage
\setcounter{page}{1}

\Blinddocument

\end{document}
knasibas
Posts: 3
Joined: Mon Sep 13, 2010 7:26 pm

Re: Disable page number in title page using fancyhdr

Post by knasibas »

It works perfect! Thank you!
Last edited by knasibas on Tue Sep 14, 2010 7:42 am, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Disable page number in title page using fancyhdr

Post by localghost »

Now that the problem is obviously solved, please be so kind and mark the topic (not the last post) accordingly as clearly written in Section 3 of the Board Rules (to be read before posting).


Best regards and welcome to the board
Thorsten
Post Reply