1

I insert some landscape pages in my article with the package typearea. Then I find that the text body at landscape pages are two small, too much horizontal margin spaces are wasted. Please see the attached figure.

So how to enlarge the text body(width and height) at landscpe pages? And how to adjust all sizes of page(headheight, bottom, top, hmargin etc.) respectively

MWE:

\documentclass{article}
\usepackage{typearea}
\usepackage{geometry,layout}
\geometry{showframe}
\begin{document}
\section{This is my Portrait Page}
\clearpage
\KOMAoptions{paper=landscape,pagesize}
\recalctypearea
\section{This is my Landscape Page}
Text in my landscape section\footnote{Footnote in Landscape}
\clearpage
Text in my landscape
\clearpage
\KOMAoptions{paper=portrait,pagesize}
\recalctypearea
\section{This is again Portrait Page}
\end{document}

enter image description here

1 Answer 1

2

Suggestion without package geometry:

\documentclass{article}
\usepackage{typearea}
\usepackage{showframe}

\AtBeginDocument{%
  \storeareas\normalpapersize
}
\BeforeRestoreareas{\cleardoublepage}

\newcommand*\uselandscape{%
  \cleardoublepage
  \KOMAoptions{paper=landscape}%
  \recalctypearea
  \areaset{1.6\textwidth}{1.6\textheight}% adjust here: \areaset{<text body width>}{<text body height>}
}

\begin{document}
\section{This is my Portrait Page}

\uselandscape
\section{This is my Landscape Page}
Text in my landscape section\footnote{Footnote in Landscape}
\clearpage
Text in my landscape

\normalpapersize
\section{This is again Portrait Page}
\end{document}

enter image description here

Suggestion using package geometry to adjust the margins:

\documentclass{article}
\usepackage[usegeometry]{typearea}
\usepackage[showframe]{geometry}
\newcommand*\useportrait{%
  \cleardoublepage
  \KOMAoptions{paper=portrait,DIV=current}%
  \newgeometry{hmargin=2cm,top=3cm,bottom=4cm}%
}
\newcommand*\uselandscape{%
  \cleardoublepage
  \KOMAoptions{paper=landscape,DIV=current}%
  \newgeometry{vmargin=2cm,left=4cm,right=3cm}%
}
\AtBeginDocument{\useportrait}
\begin{document}
\section{This is my Portrait Page}

\uselandscape
\section{This is my Landscape Page}
Text in my landscape section\footnote{Footnote in Landscape}
\clearpage
Text in my landscape

\useportrait
\section{This is again Portrait Page}
\end{document}

enter image description here

5
  • Many thanks! And I don't quite understand \storeareas\normalpapersize in the version of with geometry. They just appear one time. Is it mandatory? What's the function?
    – lyl
    Commented Jun 7, 2021 at 12:51
  • Oh, sorry. I have corrected it now to \AtBeginDocument{\useportrait}.
    – esdd
    Commented Jun 7, 2021 at 14:08
  • @esdd this is great and really solves my issue. Is there anyway to change the margin area specific borders in areaset? So a unique margin for bottom, top gith etc., Commented Oct 28, 2022 at 2:11
  • @esdd Would it also be possible with the typearea method to adjust the distance between the body text and the header?
    – PLY
    Commented May 30, 2023 at 14:57
  • @PLY You can change headsep using package geometry.
    – esdd
    Commented Jun 11, 2023 at 10:55

You must log in to answer this question.

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