17

My code is the following:

    \documentclass[12pt,titlepage]{article}

\usepackage{harvard}
\usepackage{setspace}  
\usepackage{ifthen}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage[font=bf, labelsep=period]{caption}
\usepackage{changepage}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{endnotes}

    \begin{document}


    \title{some title}
    \singlespace{\author{author stuff}}

    \maketitle


    \newpage
    \begin{abstract}
      abstract stuff
    \end{abstract}

    \newpage
    \doublespace

    \section*{Introduction}

    blah blah blah

    \end{document}

When I compile this, page 1 starts on the third page (i.e., on the page where the section Introduction starts). However, I want page 1 to begin from the title page, then abstract page would be page 2, and introduction page would be page 3 and so on. How can I do this?

Note that I want the page numbers to actually show. That is, on the bottom of the title page, the number 1 needs to show.

0

3 Answers 3

8

I have started hacking the \thispagestyle and \setcounter commands, but it wasn't a good idea, please try \addtocounter{page}{2}, I enclose an example.

\documentclass[12pt,titlepage]{article}
\usepackage{setspace}
\begin{document}
% Beginning of hack...
%\let\oldthispagestyle=\thispagestyle % If we want to see a page number.
%\def\thispagestyle#1{} % If we want to see a page number.
%\let\oldsetcounter=\setcounter
%\def\setcounter#1#2{}
% End of hack...
\singlespacing
\title{My title}
\author{Author}
\maketitle
\newpage
\begin{abstract}
  Abstract stuff.
\end{abstract}
\newpage
\doublespacing
\addtocounter{page}{2}
% Restore commands...
%\let\thispagestyle=\oldthispagestyle % If we want to see a page number.
%\let\setcounter=\oldsetcounter
% End of restoring commands...
\section*{Introduction}
My first page.
\newpage
Another text.
\end{document}

mwe

5
  • 1
    @TrueTears Really? Doesn't look like there are numbers on the title and abstract pages, but the image is a little small!
    – FionaSmith
    Commented Apr 17, 2014 at 9:09
  • @Malipovo could it be that your original hack did do this, but the \addtocounter method doesn't (i.e. it just increases the counter for the pages where the page number is already displayed?
    – FionaSmith
    Commented Apr 17, 2014 at 9:16
  • @FionaSmith I believed that there shouldn't be page numbers on page 1 and 2, it could be arranged if OP wanted that.
    – Malipivo
    Commented Apr 17, 2014 at 9:33
  • @Malipivo, in the question by TrueTears it is said "Note that I want the page numbers to actually show. That is, on the bottom of the title page, the number 1 needs to show." I would be really grateful if you could arrange this.
    – Qaswed
    Commented Jun 15, 2016 at 11:54
  • Thanks. Needed to start first page from 'Page 2' and adding \addtocounter{page}{1} after \begin{document} did the trick
    – Tanel
    Commented Jul 25, 2022 at 19:02
15

The titlepage environment in the article class resets the page number to 1 both at the beginning and at the end; when the titlepage option is specified, abstract uses the titlepage environment internally. Since you want continuous numbering, the remedy is to redefine titlepage in order to remove the page number resetting.

\documentclass[12pt,titlepage]{article}

\usepackage{harvard}
\usepackage{setspace}  
\usepackage{ifthen}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage[font=bf, labelsep=period]{caption}
\usepackage{changepage}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{endnotes}

\makeatletter
\renewenvironment{titlepage}
 {%
  \if@twocolumn
    \@restonecoltrue\onecolumn
  \else
    \@restonecolfalse\newpage
  \fi
  \thispagestyle{empty}%
 }
 {%
  \if@restonecol
    \twocolumn
  \else
    \newpage
  \fi
 }
\makeatother

\begin{document}


\title{some title}
\author{author stuff}

\maketitle


\newpage
\begin{abstract}
  abstract stuff
\end{abstract}

\newpage
\doublespacing

\section*{Introduction}

blah blah blah

\end{document}

Note that \doublespace is wrong (not only typographically): the correct declaration is \doublespacing. Also \singlespace doesn't take an argument (and it is wrong in the same way); until you don't issue \doublespacing, \singlespacing is implied.

It's easy to show the page numbers also in the title page and in the abstract page:

\documentclass[12pt,titlepage]{article}

\usepackage{harvard}
\usepackage{setspace}  
\usepackage{ifthen}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage[font=bf, labelsep=period]{caption}
\usepackage{changepage}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{endnotes}

\makeatletter
\renewenvironment{titlepage}
 {%
  \if@twocolumn
    \@restonecoltrue\onecolumn
  \else
    \@restonecolfalse\newpage
  \fi
  \thispagestyle{plain}%
 }
 {%
  \if@restonecol
    \twocolumn
  \else
    \newpage
  \fi
 }
\makeatother

\begin{document}


\title{some title}
\author{author stuff}

\maketitle


\newpage
\begin{abstract}
  abstract stuff
\end{abstract}
\thispagestyle{plain}

\newpage
\doublespacing

\section*{Introduction}

blah blah blah

\end{document}
7
  • This is a general answer. IMHO it is better solution than Malipivo answer. Commented Apr 17, 2014 at 14:16
  • @jpayansomet I agree with you, but try to explain this solution to a TeX beginner.
    – Malipivo
    Commented Apr 18, 2014 at 4:11
  • How would you adapt this for the book document class?
    – Mmmh mmh
    Commented May 18, 2015 at 10:31
  • @AurélienOoms This should be a new question, because it may depend on the options you pass to the class.
    – egreg
    Commented May 18, 2015 at 11:32
  • @egreg, your example Displays on the third page the number 3, but unfortunately on the title and abstract page there are no numbers displayed (what is requested by @TrueTears).
    – Qaswed
    Commented Jun 15, 2016 at 11:45
1

I took your file, removed the titlepage option in \documentclass.

\documentclass[12pt]{article}

\usepackage{harvard}
\usepackage{setspace}  
\usepackage{ifthen}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage[font=bf, labelsep=period]{caption}
\usepackage{changepage}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{endnotes}

\begin{document}


\title{some title}
\singlespace{\author{author stuff}}

\maketitle




\newpage
\begin{abstract}
  abstract stuff
\end{abstract}

\newpage
\doublespace

\section*{Introduction}

blah blah blah

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .