Theses, Books, Title pagesMake page numbers on bottom in landscape page

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Make page numbers on bottom in landscape page

Post by byn »

I would like to know how to make the page number in a landscape page go to the bottom of the page. The link to the minimum working example of my code is here on the link below; https://drive.google.com/file/d/1fO0s9Z ... share_link

The picture of the landscape page is shown here below;

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Make page numbers on bottom in landscape page

Post by byn »

This is the output of the page numbering
page-number.JPG
page-number.JPG (113.32 KiB) Viewed 110252 times
the whole file output is here below
main-landscape-page-number.pdf
(892.03 KiB) Downloaded 1741 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Make page numbers on bottom in landscape page

Post by Stefan Kottwitz »

A solution from John Kormylo here, is add to your preamble:

Code: Select all

\usepackage{everypage}
\newcommand{\Lpagenumber}{\ifdim\textwidth=\linewidth\else\bgroup
  \dimendef\margin=0 %use \margin instead of \dimen0
  \ifodd\value{page}\margin=\oddsidemargin
  \else\margin=\evensidemargin
  \fi
  \raisebox{\dimexpr -\topmargin-\headheight-\headsep-0.5\linewidth}[0pt][0pt]{%
    \rlap{\hspace{\dimexpr \margin+\textheight+\footskip}%
    \llap{\rotatebox{90}{\thepage}}}}%
\egroup\fi}
\AddEverypageHook{\Lpagenumber}%
Stefan
LaTeX.org admin
byn
Posts: 56
Joined: Fri Jun 10, 2022 12:27 pm

Make page numbers on bottom in landscape page

Post by byn »

Works well!
SarahIlham
Posts: 1
Joined: Fri Nov 24, 2023 5:31 am

Make page numbers on bottom in landscape page

Post by SarahIlham »

Hi! Thanks for the solution. It is also works well for me. However, the page number of portrait and landscape position appear for both. How can I off the portrait position when landscape page is used?


Thanks :)
Post Reply