1

I am using \pagestyle{myheadings} in a LaTeX document, which by default shows the page number in the top right corner of the page. How can I change the position of the page number to bottom right?

  • Use fancyhdr or titleps. – Bernard Oct 13 '15 at 9:07
  • Or scrlayer-scrpage – Johannes_B Oct 13 '15 at 9:31
2

Here's a solution without any other package, copied from article.cls and renamed to myotherheadings (The blindtext package is only for filling up the pages)

\documentclass[twoside]{article}

\usepackage{blindtext}
\makeatletter
\def\ps@myotherheadings{%
  \def\@evenfoot{\thepage\hfil}%  -> page number then fill
  \def\@oddfoot{\hfil\thepage} %  -> fill, then page number
  \def\@oddhead{{\slshape\rightmark}\hfil} % remove the page number
  \def\@evenhead{\hfil\slshape\leftmark}%
  \let\@mkboth\@gobbletwo
  \let\sectionmark\@gobble
  \let\subsectionmark\@gobble
}

\makeatother

\begin{document}
\pagestyle{myotherheadings}
\section{First}
\blindtext[10]
\end{document}

Here's a fancyhdr version:

\documentclass[twoside]{article}

\usepackage{blindtext}
\usepackage{fancyhdr}

\renewcommand{\headrulewidth}{0pt}
\fancyhead[RO]{}
\fancyfoot{}
\fancyfoot[RO,LE]{\thepage}

\pagestyle{fancy}

\begin{document}
\section{First}
\blindtext[10]
\end{document}
  • To be honest, i wouldn't recommend this to anybody. Especially not to people asking the question. – Johannes_B Oct 13 '15 at 9:32
  • @Johannes_B: Why? It's pure LaTeX – user31729 Oct 13 '15 at 9:34
  • low-level. du sagst den Leuten doch auch nicht, dass sie mit nem Handbohrer Löcher machen können. Und wenn, dann erwähnst du zumindest die Bohrmaschine. – Johannes_B Oct 13 '15 at 9:38
  • Or in other words, how would a starter begin to understand what's going on? – Johannes_B Oct 13 '15 at 9:40
  • I wanted to provide a low-level way too ... feel free to use the high-level scrlayer stuff ;-) – user31729 Oct 13 '15 at 9:45
1

Alternative solutions with scrlayer-scrpage and titleps:

\documentclass{article}
\usepackage{blindtext}
\usepackage[automark,
    markcase=noupper%no uppercased headings
]{scrlayer-scrpage}
\clearpairofpagestyles%clear all defaults
\ihead*{\headmark}
\ofoot*{\pagemark}
\begin{document}
\Blinddocument
\end{document}
\documentclass{article}
\usepackage{blindtext}
\usepackage{titleps}
\newpagestyle{bawejakunal}{
    \sethead[][][]%empty, oneside
{\sectiontitle}{}{}
\setfoot[][][]%empty, oneside
{}{}{\thepage}
}
\pagestyle{bawejakunal}
\begin{document}
\Blinddocument
\end{document}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.