1

In the landscape environment, the number of pages appears in the left-hand side of the page. This is while I want to force LaTeX to print all the page numbers at the bottom. The following code is the MWE of my intended LaTeX. Please help me out to resolve this problem.

\documentclass[a4paper,11pt]{article}
\usepackage{pdflscape}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}
\begin{landscape}
\begin{figure}
\centering
\begin{subfigure}[t]{0.7\textwidth}
    \includegraphics[width=\linewidth]{Figure4a.pdf}
    \caption{Positive decision variables}\label{Fig4a}
\end{subfigure}
~
\begin{subfigure}[t]{0.7\textwidth}
    \includegraphics[width=\linewidth]{Figure4b.pdf}
    \caption{Binary decision variables}\label{Fig4b}
\end{subfigure}\\[1ex]

\caption{XXX}
\label{Fig1}
\end{figure}
\end{landscape}
\end{document}
mdslt
  • 503
  • See https://tex.stackexchange.com/questions/209685/landscape-mode-and-page-numbering/209692?r=SearchResults&s=1|25.2759#209692 – John Kormylo Feb 01 '19 at 20:06
  • I used both methods, but they do not work for my code. If possible, please modify the MWE and make sure it works properly. Then, send it to me. Many thanks in advance. – mdslt Feb 01 '19 at 20:53

2 Answers2

1

Have you tried to use the approach based on typearea as it was described on How to change certain pages into landscape/portrait mode?

Instead of

\documentclass{article} \usepackage[paper=portrait,pagesize]{typearea}

you can also use

\documentclass[paper=portrait,pagesize]{scrartcl}

Typo
  • 191
1

I modified the code as follows and it works right now. Note that the current layout of the below code is like the following image:

enter image description here

\documentclass[a4paper,11pt]{article}
\usepackage{pdflscape}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{everypage}

\newlength{\hfoot}
\newlength{\vfoot}
\AddEverypageHook{\ifdim\textwidth=\linewidth\relax
\else\setlength{\hfoot}{-\topmargin}%
\addtolength{\hfoot}{-\headheight}%
\addtolength{\hfoot}{-\headsep}%
\addtolength{\hfoot}{-.5\linewidth}%
\ifodd\value{page}\setlength{\vfoot}{\oddsidemargin}%
\else\setlength{\vfoot}{\evensidemargin}\fi%
\addtolength{\vfoot}{\textheight}%
\addtolength{\vfoot}{\footskip}%
\raisebox{\hfoot}[0pt][0pt]{\rlap{\hspace{\vfoot}\rotatebox[origin=cB]{90}{\thepage}}}\fi}

\begin{document}
\pagebreak{}

\begin{landscape}
\pagestyle{empty}

\begin{figure}
\centering
\begin{subfigure}[t]{0.7\textwidth}
    \includegraphics[width=\linewidth]{Figure4a.pdf}
    \caption{Positive decision variables}\label{Fig4a}
\end{subfigure}
~
\begin{subfigure}[t]{0.7\textwidth}
    \includegraphics[width=\linewidth]{Figure4b.pdf}
    \caption{Binary decision variables}\label{Fig4b}
\end{subfigure}\\[1ex]

\caption{XXX}
\label{Fig1}
\end{figure}
\end{landscape}
\pagestyle{empty}

\end{document}
mdslt
  • 503
  • Sorry, I'm new here. I modified my later post to make it like an answer to my original question. – mdslt Feb 02 '19 at 17:24