3

I have to make a A3 page (which contains several figures) within my A4 document. This page should have landscape style, two columns and contain the usual header and page number. With the help of several posts here I found a solution for most of the problems, but: The space for text/figures is too small resp. the margins are too large. As it was recommended on other posts I tried \addtolength{\hoffset}{-4.0cm}, but unfortunately it just shifted everything to the left, so the right margin was still too large...I also tried some stuff by the use of \usepackage{changepage}, but I had no luck. Any advices?


\documentclass[12pt,a4paper,twoside,BCOR=12mm]{scrbook} %,BCOR=80mm
\usepackage{geometry}
\usepackage{afterpage}
\usepackage{multicol}
\usepackage{lipsum}
\usepackage[demo]{graphicx}

\usepackage[autooneside=false,headsepline=1.9pt]{scrlayer-scrpage}
\ohead{\pagemark}

\begin{document}
Text on A4 page \lipsum[1]

\afterpage{% Insert after the current page
\clearpage
\KOMAoptions{paper=A3,paper=landscape,twocolumn,pagesize}
%\addtolength{\hoffset}{-4.0cm}
\recalctypearea
Text on A3 page\lipsum[2]

\lipsum[3]

\begin{figure}
 \centering
 \includegraphics[width=\linewidth]{foo}
 \caption{Awesome figure caption.}
\end{figure}

\clearpage
\KOMAoptions{paper=A4,pagesize}
\recalctypearea
}

\end{document}
Stefan Pinnow
  • 29,535
Holg
  • 31
  • Please use ctrl-K to format your sample as code. – ajeh Dec 23 '16 at 20:31
  • The \savegeometry, \newgeometry and \restoregeometry macros of the geometry package should allow such things for you. – Steven B. Segletes Dec 24 '16 at 01:37
  • So you don't really want an A3 page; you want a figure to span an A4 page spread. Is that right? Or are you envisioning something like a fold-out page? – dgoodmaniii Dec 24 '16 at 19:26
  • Thanks for the advice with ctrl+K! I looked for it but did not found it (it was my first post here...). I tried \newgeometry but it did not work. As far as I understood the documentation of the geometry usepackage, it is not the aim to use \newgeometry for other dimensions of the page itself. – Holg Dec 26 '16 at 13:47
  • @dgoodmaniii: Yeah, a fold-out page is exactly what I want! – Holg Dec 26 '16 at 13:48

2 Answers2

4

1st Step

I would generate a separate document with a A3 page size and landscape orientation that only contains the figures and so on. Something like this:

\documentclass[ 
   paper = A3, 
   paper = landscape, 
   pagesize = auto 
   ]{scrbook}

2nd Step

I would then include the resulting PDF document (A3) in your actual A4 document using the famous pdfpages package and it's \includepdf[options]{FileNameWithoutSpacesOrBlanks} command.

  • A separat pdf file is not was I prefere as numbering of the figures and pages in the A4-file will probably become a mass...But for shure it is the last opportunity, if nothing else is working, you're right! – Holg Dec 26 '16 at 13:52
  • @Holg Yes, it's a simple and fast solution but not ideal. I just wanted to supply you an answer as there were only comments so far. – Dr. Manuel Kuehner Dec 26 '16 at 14:10
1

Generating a separate pdf file is probably the best solution. Probably. It depends on how the following solution interacts with your other packages; since we don't know those, I can't really predict it.

However, based on an answer by Martin Scharrer at A3 pages within A4 doc, I think that the following may work for you. It may do some crazy things with your setup if you're using geometry, for example. Or it may not; I haven't tested any of that. But it uses some KOMAscript facilities within the standard LaTeX class to work, and seems to be effective in the MWE example I put together here:

\documentclass[a4paper]{article}
\usepackage{afterpage}
\usepackage[paper=A4,pagesize]{typearea}
\usepackage{lipsum}

\begin{document}

\lipsum

\afterpage{
    \clearpage
    \KOMAoptions{paper=A3,paper=landscape,pagesize}
    \recalctypearea
    \begin{table}[p]
    \begin{tabular}{lp{0.85\linewidth}}
        This & \lipsum[1] \\
    \end{tabular}
    \caption{A very wide table}
    \end{table}
    \clearpage
    \KOMAoptions{paper=A4,pagesize}
    \recalctypearea
}

\lipsum%

\lipsum%

\end{document}

First Spread Second spread Third spread

Now, I've cropped out the margins here, appended page spreads together in a weird way (the odd pages are on the left, for example), and cropped to make it fit better such that the A3 page looks like a landscape A4 page, but it does give an idea of what the results will be.

Failing that, I think your only option will be to hand-hack it such that you eject the current page, reset the page sizes with primitives, set your page geometry with the geometry package, and then reset it later. E.g.:

\documentclass{article}
\usepackage{lipsum}

\usepackage[margin=1in]{geometry}

\newenvironment{foldoutfloat}{%
    \eject\pdfpageheight=11in\pdfpagewidth=17in
    \newgeometry{margin=1in}
    \textwidth=15in
    \begin{table}[p]
}{%
    \end{table}
    \clearpage % otherwise it will float to another, non-resized page
    \eject\pdfpageheight=11in\pdfpagewidth=8.5in
    \restoregeometry
}%


\begin{document}

\lipsum

\begin{foldoutfloat}
\begin{tabular}{lp{0.85\textwidth}}
    This & \lipsum[1] \\
\end{tabular}
\caption{A wide table}
\end{foldoutfloat}

\lipsum%

\end{document}

This method is definitely suboptimal; you have to reset your page geometry both for your foldout pages and your normal pages if you do a redesign, it only works for pdftex (due to the use of pdftex primitives), and it doesn't really float the figure; it's wrapped in a floating environment just to keep the numbering and the captions. But it gives you this:

First page Second page Third page

Some of the more wizened wizards here can surely come up with a better general solution; but that's what I've got.

dgoodmaniii
  • 4,270
  • 1
  • 19
  • 36
  • Thanks to all of you for fruitfull discussions and creative ideas! I think the latest proposed solution will do what I want...Still one question is left: Why is \eject\pdfpageheight=11in\pdfpagewidth=8.5in necessary at the end of the new environment? – Holg Dec 28 '16 at 19:28
  • To get the page back to its original dimensions. – dgoodmaniii Dec 28 '16 at 19:30
  • @dgoodmaniii I could not change the margin based on your code. IS there anything missing? – Ahmed Sayed Mar 07 '18 at 17:54
  • For the foldoutfloat environment? Did you try just changing \newgeometry{margin=1in} to reflect a different margin? I just tried this, and it worked. – dgoodmaniii Mar 09 '18 at 02:15