1

I am writing my end of studies project report on latex (overleaf). I had to use A3 size pages to insert large size charts and tables but had two issues:

1 / The numbering of the A3 page is no longer displayed (knowing that I use the "plain" style) because I had to change the page margins (to display the graphic centered in the middle). How could I display it at the bottom center?

2 / The numbering of the A4 page which directly follows the A3 page has moved to the middle of the page What to do, please?

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

\usepackage{graphicx} \usepackage{afterpage} \begin{document}

\afterpage{ \clearpage \pagestyle{plain} \KOMAoptions{paper=a3,paper=landscape} \addtolength{\hoffset}{-17.0cm} \addtolength{\voffset}{-5.0cm} \recalctypearea \begin{figure}[htbp] \centering \includegraphics[width=3.5\textwidth]{GanttT.PNG}

\caption {Diagramme de Gantt} \label{fig:vo-business-schema}

\end{figure}

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

\newpage \pagestyle{plain} \section*{Conclusion}

\end{document}

enter image description hereenter image description here

1 Answers1

0

When including graphics, in the future please use \usepackage[demo]{graphicx} as the package option and use \includegraphics["options"]{demo} in the main body, as your example cannot compile due to us not having access to your GanttT.PNG.

I have changed your code quite a lot but it does as you require (page number centred on A3 page, revert back to A4 page normally):

\documentclass[a4paper]{article}

\usepackage[usegeometry]{typearea} \usepackage[demo]{graphicx} \usepackage{geometry}

% Assumed a geometry, delete both \newgeometry commands to use the default geometry of your document \newgeometry{inner=2.5cm,outer=2.5cm,top=3cm,bottom=3cm}

\newcommand\paperAThreeLandscape{% \cleardoublepage% \KOMAoptions{paper=A3,paper=landscape,DIV=last}% \newgeometry{margin=1in}% }

\newcommand\afterPaperChange{% \clearpage% \KOMAoptions{paper=A4,paper=portrait,pagesize}% \recalctypearea% \newgeometry{inner=2.5cm,outer=2.5cm,top=3cm,bottom=3cm} % Change geometry to what it was set to before }

\begin{document}

\section*{Before gantt}

\clearpage \pagestyle{plain}

\paperAThreeLandscape \begin{figure}[htbp] \centering \includegraphics[width=\textwidth,height=15cm]{demo} \caption {Diagramme de Gantt} \label{fig:vo-business-schema}

\end{figure}

\afterPaperChange

\newpage \pagestyle{plain} \section*{Conclusion}

\end{document}

This produces this on the A3 page (note the black rectangle is the demo graphic):

A3

And this on the A4 page:

A4

I cannot remember where I got the code (or parts of it anyway) for changing paper size midway through a document but I think it was from Martin Scharrer. Change the height option on include graphics to suit your requirements, I selected 15cm just because. Change the margin of the A3 page to what you require too, 1in was selected as that is what I use in my files. I removed the afterpage package, if this is unacceptable then I do not how to do what you require within the confines of that package but hopefully someone else can! Hope this helps.