Based on the first answer from a previous post "Insert foldable A3 pages in an A4 document with active references", I tried to get a figure on an A3 page in my thesis. However, it does not turn out as it should: the picture does not get centered on the page. Otherwise it works. (see below for example output).
What I would like: The picture centered on the page and the caption on the inner half of the A3 page, just as if it were an A4 page. Any ideas? I also do need hyperref working ...
\usepackage[demo]{graphicx}
\usepackage{lipsum}
\usepackage{afterpage}
\usepackage{changepage}
\newenvironment{hugepage}%
{\clearpage
\pagestyle{empty} % turn off display of page numbers, headers, ...
\changepage{247mm}{370mm}{25mm}{15mm}{}{}{}{}{}} % switch to A3
{\clearpage
\changepage{160mm}{247mm}{25mm}{25mm}{}{}{}{}{}} % back to A4
\begin{document}
\afterpage{%
\pdfpagewidth=2\pdfpagewidth
\pagestyle{empty}
\begin{hugepage}
$\,$
\begin{figure}[!t]
\includegraphics[width=308mm,height=229mm,page=1]{figures/aaa.pdf}
\caption{Left side image A3.}
\end{figure}
\end{hugepage}
}
\newpage
\afterpage{%
\pdfpagewidth=2\pdfpagewidth
\pagestyle{empty}
\begin{hugepage}
$\,$
\begin{figure}[!t]
\includegraphics[width=308mm,height=229mm,page=2]{figures/aaa.pdf}
\caption{Right side image A3.}
\end{figure}
\end{hugepage}
}
\lipsum{3}
\end{document}
Page 2 (the A3 page) looks like this:
The problem is, that the picture is not center aligned. The caption is on the right side of the odd and the even page, but it should be on the right side of the even and on the left side of the odd page.
Other suggested solutions are:
change of textwidth
(Not an option since it requires memoir
class).
using a KOMA script (Which results in non-centered image as well. And the caption got centered as well, but it should not be). Code of which looks like this:
\afterpage{% Insert after the current page
\clearpage
\KOMAoptions{paper=A3,paper=landscape,pagesize}
\recalctypearea
\begin{figure}[p]
\centering
\includegraphics[width=308mm,height=229mm,keepaspectratio]{largeimage}%
\caption{A large image which required A3}
\end{figure}
\clearpage
\KOMAoptions{paper=A4,pagesize}
\recalctypearea
}
However, it messes up with the page numbers. (see page 3).
afterpage
-package. This doesn't always work as you would expect (had many problem with that while trying to change pagecolors). – MrD Apr 18 '13 at 20:32\LaTeX
's floating environments." (it's said that for 20 years but it's still just a sketch really:-) – David Carlisle Apr 18 '13 at 21:22