# How to reset document geometry on floating full page image

For my thesis I want some images to use a full-page without creating a page break at the insert AND changing the page document geometry of only the image page.

I have found that \begin{figure}[p] forces a full page dedicated to the figure and this works for me.

I have found that \usepackage[<variable>]{geometry} has a \newgeometry{} and a \restoregeometry but this does not work for me (following the manual for the The geometry package)

My preamble runs \usepackage[left=8cm,right=1cm,top=2cm,bottom=4cm,marginparwidth=7cm,marginparsep=0.5cm]{geometry}

My main also runs

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt} % remove line in header
\setlength\headsep{3cm}
\setlength\textheight{20cm}
\setlength\footskip{4,3cm}


for the record.

I'm currently running this figure code without any luck

\begin{figure}[p]
\newgeometry{}
\centering
\includegraphics[width=1\textwidth]{Fig/Co_Creation/DivCon.pdf}
\caption{Planned divergence and convergence in the co-creation process}
\label{fig:diagramDC}
\clearpage
\restoregeometry
\end{figure}


Ideally, I'd like to remove any content in the header and footer on these pages as well.

Kind regards

Leo

• It is easier to overlap the margins than change them. See tex.stackexchange.com/questions/623907/… Mar 16 at 23:09
• If the answer meets your original request please accept it by checking the green tickmark on left side of the answer. Mar 23 at 20:28

## 1 Answer

You have to define what new geometry want. Also both \newgeometry and \restoregeometry should go outside of the figure environment.

With \pagestyle{empty} you cancel all headers and footers. You can then restore the fancy style or invoke another.

\documentclass[12pt,a4paper]{book}

\usepackage{kantlipsum} % only dummy tet <<<
\usepackage{graphicx}

\usepackage[left=8cm,right=1cm,top=2cm,bottom=4cm,marginparwidth=7cm,marginparsep=0.5cm,showframe]{geometry} % added showframe <<<

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,LE]{\thepage}
\renewcommand{\headrulewidth}{0pt} % remove line in header

\begin{document}
1.  \kant[1-3]

\newgeometry{left=3cm,right=3cm,top=2cm,bottom=3cm,marginparwidth=0cm,marginparsep=0cm}
\pagestyle{empty} % no headers nor footers
\begin{figure}[p]
\centering
\includegraphics[width=1\textwidth]{example-image}
\caption{Planned divergence and convergence in the co-creation process}
\label{fig:diagramDC}
\end{figure}

\restoregeometry
\pagestyle{fancy} % restore headers and footers <<<

2.  \kant[2]

\end{document}

• This is close, but I lack the float effect, i.e. the text breaks at the location of the image and creates half full pages of text. Is there a way to have the text continue? Mar 18 at 10:47
• @Leo Heinzl \newgeometry will start a new page. LaTeX is doing its best. Mar 18 at 12:54
• Thank you for your time and answers. I will continue with your solution and manually rearrange in the end. Mar 19 at 11:01