[Tex/LaTex] Roman page numbering for the Abstract, Acknowledgements and ToC, arabic for the rest in the article environment doesn’t work

page-numbering

I've searched for this answer but every time, the answer was given for the report/memoir/book environment and for the article environment, which I am using, it doesn't work properly.

As said in the title, I want my abstract, my acknowledgements and ToC to be numbered in roman numbers and the rest of the text in arabic.

\documentclass[titlepage]{article}
\begin{document}
\maketitle

\pagenumbering{roman}

\begin{abstract}
   Here is the abstract
\end{abstract}

\newpage
\renewcommand{\abstractname}{Acknowledgements}

\begin{abstract}
    I would like to thank blablabla
\end{abstract}

\newpage
\tableofcontents

\pagebreak
\section{Introduction}
\pagenumbering{arabic}

    Blabla

\end{document}

Basically, the abstract is numbered as i, the acknowledgements are not numbered and the Toc is also numbered as i… If now I do

\documentclass[titlepage]{article}
\begin{document}
\maketitle

\pagenumbering{roman}

\begin{abstract}
   Here is the abstract
\end{abstract}

\newpage
\setcounter{page}{2} % This has been added
\renewcommand{\abstractname}{Acknowledgements}

\begin{abstract}
    I would like to thank blablabla
\end{abstract}

\newpage
\setcounter{page}{3} % This has been added
\tableofcontents

\pagebreak
\section{Introduction}
\pagenumbering{arabic}

    Blabla

\end{document}

The abstract is i, the ToC is iii… But the acknowledgements are still nothing and I don't understand why.

For the arabic numbering, everything goes fine.

Best Answer

article.cls defines abstract environment using titlepage. To have pagenumbering, we may renew abstract:

\makeatletter
\if@titlepage
  \renewenvironment{abstract}{%
%      \titlepage
      \null\vfil
      \@beginparpenalty\@lowpenalty
      \begin{center}%
        \bfseries \abstractname
        \@endparpenalty\@M
      \end{center}}%
     {\par\vfil\null  %\endtitlepage
     }
\else
  \renewenvironment{abstract}{%
      \if@twocolumn
        \section*{\abstractname}%
      \else
        \small
        \begin{center}%
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
        \end{center}%
        \quotation
      \fi}
      {\if@twocolumn\else\endquotation\fi}
\fi
\makeatother