Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a LaTeX report with title, abstract and the main part. I want to have numbers on every single page starting from the first. How do I do that? The way it is now is that the first page is not numbered and there is a numbering before the abstract which starts from 1 after the abstract.

share|improve this question
    
Welcome to TeX.SE! Which document class do you use -- book, report, article, ...? If you use \part and \chapter instructions, do you want to have page numbers show up on the corresponding pages as well? –  Mico Aug 22 '12 at 11:03
    
I use report. I actually want every page to be counted and the number to appear everywhere except the first (title) page. –  user579674 Aug 22 '12 at 11:05
    
@user579674, check if there is some \pagestyle{} command in your document. Also, how are you doing your title page? Anyway, you can try to use the command \pagestyle{plain}. –  Sigur Aug 22 '12 at 11:20
    
There is no \pagestyle{} command. I did try to use it though without any success. I tried putting it before and after \begin{abstract} but still no good. I do the title page with \begin{titlepage}. –  user579674 Aug 22 '12 at 11:25

2 Answers 2

up vote 3 down vote accepted

LaTeX knows three basic page styles

  • empty
  • plain
  • headings

empty is what it says, an empty page. commonly used on titlepages plain is what is used on chapter start pages headings is all other pages.

The pages are internally actually counted throughout the document. So even if a page has pagestyle empty, the counter goes up, the page number is just not displayed.

You mentioned that you are using the an abstract and I assume you are using an abstract-environment for this. Following the definition of the abstract in report.cls one finds that it uses the same as the titlepage and that the page number is hidden and reset after the abstract with

 \thispagestyle{empty}%
  \setcounter{page}\z@

An easy way to get around this is to redefine the environment

\documentclass{report}

\usepackage{lipsum}

\makeatletter
\renewenvironment{titlepage}
    {%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse\newpage
      \fi
     % \thispagestyle{empty}% remove the empty page style
      %\setcounter{page}\z@ %remove the counter reset
    }%
\makeatother

\begin{document}

\begin{titlepage}
 A title
\end{titlepage}


\begin{abstract}

 bla
\end{abstract}

\chapter{first}
\lipsum
\chapter{second}
\lipsum
\section{subsecond}
\lipsum

\end{document}

This gives you a document where the titlepage has page 1 (also shown on the paper) and the counter isn't reset anymore

share|improve this answer
    
That did solve the problem with the abstract and the counter but the numbering starts from page 2 which is numbered as 1. Can I make it to start from 2 as I want the title page to be considered as 1 (but having the number hidden on title page)? –  user579674 Aug 22 '12 at 11:37
    
I fixed it by adding \setcounter{page}{2} after what you suggested and it seems to work –  user579674 Aug 22 '12 at 11:42
    
I do have one minor problem. The title Abstract is now gone from the abstract page. How do I bring it back? –  user579674 Aug 22 '12 at 11:45
    
Your question wan't entirely clear to me. In my example even the titlepage gets a printed page number (1). If you want to hide it, write \begin{titlepage}\thispagestyle{empty} and the titlepage will be blank, followed by the abstract with page number 2. I still see the abstarct heading.. not sure what you are doing. Maybe add a proper minimal example to your original question to avoid confusion. –  Martin H Aug 22 '12 at 11:46
    
Everything is fine with the numbering. What I'm saying is that with the \begin{abstract} command, latex automatically puts the word "Abstract" in bold at the top of the abstract page and then comes whatever is my abstract. But that word is now gone. –  user579674 Aug 22 '12 at 11:48

You don't mention which page numbering style you want to see applied to pages that don't show page numbers so far, so I'll assume you want the "plain" page style (showing the page number centered in the footer line) for those pages.

You could add the following code to your document, not in the preamble but immediately after the \maketitle instruction (or, alternatively, at the start of the first page following the titlepage environment):

\makeatletter
\let\ps@oldempty\ps@empty % save default definition of \ps@empty
\renewcommand\ps@empty\ps@plain
\makeatother
share|improve this answer
    
Now it does start numbering from second page and restarts numbering from abstract. –  user579674 Aug 22 '12 at 11:32
    
@user579674 -- I take it that you use the titlepage environment. To make the page after the title page be numbered as 2 (rather than as 1), issue the command \setcounter{page}{1} at or near the page in question. –  Mico Aug 22 '12 at 11:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.