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.

TrueTears
  • 1,617

3 Answers3

14

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}
egreg
  • 1,121,712
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

Malipivo
  • 13,287
  • 1
    @TrueTears Really? Doesn't look like there are numbers on the title and abstract pages, but the image is a little small! – FionaSmith Apr 17 '14 at 09: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 Apr 17 '14 at 09: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 Apr 17 '14 at 09: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 Jun 15 '16 at 11:54
  • Thanks. Needed to start first page from 'Page 2' and adding \addtocounter{page}{1} after \begin{document} did the trick – Tanel Jul 25 '22 at 19:02
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}
AnthonyC
  • 1,799