Consider the following example:
\documentclass[a4paper,12pt]{article}
\begin{document}
\tableofcontents
\newpage
\section{test}
\newpage
\setcounter{page}{22}
\section{introduction}
\newpage
\setcounter{page}{222}
\section{discussion}
\end{document}
which produces:

As you can see the page numbers are aligned so that ones are written under ones, tens are written under tens, etc. Was this alignment the aim of LaTeX or LaTeX aim was simply to put page numbers at the end of each line?
In other words, if this document was RTL, which of the followings would be the correct alignment of page numbers?


