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}
2
  • See tex.stackexchange.com/questions/209685/… Commented Feb 1, 2019 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
    Commented Feb 1, 2019 at 20:53

2 Answers 2

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}

1
  • This method does not work for my case!
    – mdslt
    Commented Feb 1, 2019 at 20:59
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}
1
  • Sorry, I'm new here. I modified my later post to make it like an answer to my original question.
    – mdslt
    Commented Feb 2, 2019 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .