[Tex/LaTex] Landscape A3 page in Portrait A4 Document – adds a blank page or reorients previous page – please help!

blank-pagefloatslandscape

I've got an landscape A3 page in an A4 document, but the way I've written the code, it requires a blank page, or orients the previous page landscape too.

Can anyone advise?

Also, is there an easy way to make this page not count in the page number count?

Many thanks!

\documentclass[titlepage,a4paper,12pt]{book}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{lscape}


\begin{itemize}
\item Carbon dioxide;
\item Temperature changes;
\item Global ice volume.
\end{itemize}


\begingroup


\pdfpagewidth=2\pdfpagewidth
\noindent%\makebox[0pt][l]{%
\pagestyle{empty}
\begin{landscape}


\begin{figure}[ht]
\centering
\includegraphics[width=0.95\linewidth]{BigFig.jpg}
\label{fig:locations}
\caption{TEXT}
\end{figure}

\end{landscape}

\endgroup

\end{document}

Best Answer

It occurred to me that what you really want is to make the entire page act as a float, rather than put a float into the page.

Changing the margins was harder than I thought. KOMA is obscure on the subject, and geometry forces a \newpage. Even when I reset all the parameters myself, things like \centering or \vfill don't work. I got \vfill to work by using a \vbox, or \hfill to work by using a \hbox, but not both at the same time.

I tried to use \NewEnviron, but \BODY and \afterpage don't work together. Lastly, I could not get the page number to show up on the next page, and eventually just overlayed the thing.

\documentclass{article}
\usepackage{geometry}
\usepackage{afterpage}
\usepackage{caption}% for \captionof
\usepackage{mwe}% for example-image (also loads lipsum and graphicx)

\newlength{\oldpaperheight}
\newlength{\oldpaperwidth}

\newcommand{\writepagenumber}%
{\raisebox{\dimexpr -\textheight-\footskip}[0pt][0pt]{\rlap{\makebox[\textwidth]{\thepage}}}}

\newcommand{\pagefloat}[2][1cm]% #1 = margin size (optional), #2 = contents
{\afterpage{%
 \savegeometry{current}%
 \thispagestyle{empty}%
 \paperwidth=42cm
 \eject \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight
 \topmargin=#1
 \advance\topmargin by -1in
 \headheight=0pt
 \headsep=0pt
 \oddsidemargin=#1
 \advance\oddsidemargin by -1in
 \evensidemargin=\oddsidemargin
 \linewidth=\paperwidth
 \advance\linewidth by -#1
 \advance\linewidth by -#1
 \textheight=\paperheight
 \advance\textheight by -#1
 \advance\textheight by -#1
 \textwidth=\linewidth% technically not in landscape
 \noindent\vbox to \textheight{#2}%
 \paperwidth=21cm
 \eject \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight
 \loadgeometry{current}% automatic \newpage
 \addtocounter{page}{-1}
 \noindent\null\writepagenumber
}}

\begin{document}

\pagefloat{%
\rule{\linewidth}{1pt}\vfill\par% show top of text area
\makebox[\linewidth][c]{\includegraphics[height=0.9\textheight]{example-image}}
\captionof{figure}{example image}
\vfill\par\rule{\linewidth}{1pt}% show bottom of text area
}

\lipsum[1-16]
\end{document}
Related Question