0

What is the easiest way, to have a page numbering in the documentclass article (\documentclass[a4paper,12pt,twoside]{article}) on the left/right?

  • Top or bottom? On the outer side of the page – Bernard Jul 26 '18 at 18:53
  • bottom at the outer side – user115202 Jul 26 '18 at 18:53
  • Any header/footer, or only the page numbers? – Bernard Jul 26 '18 at 18:55
  • Any package or do you already employ one for header/footer? – Skillmon Jul 26 '18 at 18:55
  • just the page numbers I don't have any header – user115202 Jul 26 '18 at 18:56
1

For me, the simplest consists in redefining the plain page style with titleps, which comes with titlesec. Add this to you preamble:

\usepackage{titleps}
\renewpagestyle{plain}{%
\sethead{}{}{}
\setfoot[\thepage][][]{}{}{\thepage}
}%
\pagestyle{plain}

Explanation of the code: the 3 optional arguments of \setfoot (in brackets) are for the left, centre and right parts of the footer on even pages, the 3 mandatory arguments for the same parts of the footer on odd pages.

Note: If you already load titlesec, do not load titleps, just load titlesec with option [pagestyles].

0

I like scrlayer-scrpage from KOMA-script. With it the following does what you want:

\documentclass[a4paper,12pt,twoside]{article}

\usepackage{duckuments} % dummy content
\usepackage{scrlayer-scrpage}
\setkomafont{pageheadfoot}{} % define font style for page head foot
\clearpairofpagestyles % remove the defaults
\ofoot{\pagemark} % put the page number in the outer footer

\begin{document}
\duckument
\end{document}

Or an alternative could be fancyhdr for which you could use:

\documentclass[a4paper,12pt,twoside]{article}

\usepackage{duckuments} % dummy content
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand\headrulewidth{0pt} % no line between document and header
\fancyhead{} % clear header
\fancyfoot{} % clear footer
\fancyfoot[LE,RO]{\thepage} % page at left on even and right on odd pages

\begin{document}
\duckument
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy