6
\documentclass{article}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
\usepackage[demo]{graphicx}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage{titlesec}
\begin{document}


\begin{figure}
\centering
\renewcommand{\arraystretch}{3}
\begin{tabular*}{\textwidth}{@{}ccc@{}}
  \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}\\
    \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}
\end{tabular*}
\end{figure}

\blindtext

\clearpage

\newgeometry{left=10mm,right=10mm}
\begin{figure}
\centering
\renewcommand{\arraystretch}{3}
\begin{tabular*}{\textwidth}{@{}ccc@{}}
  \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}\\
    \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}
\end{tabular*}
\end{figure}
\blindtext

\end{document}

For some reason this changes the position of the page number. I am not sure what is going on.

  • The page number will be in the 2 centimeter bottom margin, unless you add includefoot in the options to geometry – egreg Nov 28 '14 at 21:10
  • I have added includefoot but it has no effect. – Lenar Hoyt Nov 28 '14 at 21:40
  • What are you using \newgeometry for? If just for accommodating a wider table it's the wrong way. In any case you have to specify also top and bottom. – egreg Nov 28 '14 at 21:41
  • I’m sorry, I have misinterpreted what you said. It works fine now, thanks. – Lenar Hoyt Nov 28 '14 at 22:24
  • Regarding your question: Yes, I only use it to broaden the figure plus caption. The figure fills the whole page vertically. – Lenar Hoyt Nov 28 '14 at 22:28
7

When you specify a new geometry, old values are not retained, so geometry uses its standard method, which is of dividing the blank vertical space in a 2:3 ratio between top and bottom after applying the default text height.

Specify the missing parameters.

\documentclass{article}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
\usepackage[demo]{graphicx}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage{titlesec}
\begin{document}


\begin{figure}
\centering
\renewcommand{\arraystretch}{3}
\begin{tabular*}{\textwidth}{@{}ccc@{}}
  \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}\\
    \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}
\end{tabular*}
\end{figure}

\blindtext

\clearpage

\newgeometry{left=10mm,right=10mm,top=2.5cm,bottom=2cm}
\begin{figure}
\centering
\renewcommand{\arraystretch}{3}
\begin{tabular*}{\textwidth}{@{}ccc@{}}
  \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}\\
    \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}
\end{tabular*}
\end{figure}
\blindtext

\end{document}

However, this is the wrong method for accommodating a wide object in a figure. Use changepage and its adjustwidth environment, which doesn't require forcing a page break.

\documentclass{article}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
\usepackage[demo]{graphicx}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage{titlesec}
\usepackage{changepage}

\begin{document}


\begin{figure}
\centering
\renewcommand{\arraystretch}{3}
\begin{tabular*}{\textwidth}{@{}ccc@{}}
  \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}\\
    \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}
\end{tabular*}
\end{figure}

\blindtext

\begin{figure}
\centering
\begin{adjustwidth}{-1.5cm}{-1.5cm}
\renewcommand{\arraystretch}{3}
\begin{tabular*}{\textwidth}{@{}ccc@{}}
  \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}\\
    \includegraphics[width=0.31\linewidth,height=2cm]{dummy} &
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}&
        \includegraphics[width=0.31\linewidth,height=2cm]{dummy}
\end{tabular*}
\end{adjustwidth}
\end{figure}
\blindtext

\end{document}
  • I had an includeheadfoot in the preamble, but not in the re-definition. It works now. – Lenar Hoyt Nov 28 '14 at 22:27
  • +1 for letting me know about changepage that doesn't force a pagebreak. Saved me a lot of work. – Sverre Aug 31 '15 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.