2

I'm using the memoir class and I want to reduce the size of margin but only for 6 pages of my documents (6 pages of figures, which need a lot of horizontal space). I tried with changepage package and with \newgeometry command (geometry package) but that always reduce the size of the margins of all my document.

Thanks for help !

SLM

An example of code :

\usepackage{geometry}

\begin{document}

\part{Results}

\newgeometry{left=-3cm}
\input{results.tex} % .tex file wich contains the code to compile figures
\restoregeometry

\part{conclusion}
Bla bla bla.

\end{document}

And the results.tex file is a succession of figures (code below):

\begin{figure}[!h]
    \centering
    \captionsetup{justification=centering}
    \subfigure{
        \includegraphics[height=0.30\textwidth,width=0.45\textwidth]{file1.png}
    }
    \quad
    \subfigure{
        \includegraphics[height=0.30\textwidth,width=0.45\textwidth]{file2.png}
    }
    \caption{blabla}
    \label{1}
\end{figure}
2
  • I'm afraid I cannot reproduce what you claim. If I substitute \lipsum* (from lipsum.sty) for \input{results.tex}, which no one else has, \restoregeometry works as expected.
    – jon
    Aug 15, 2016 at 1:44
  • Thanks for reply @jon ! results.tex is a succession of figure (cf. code in previous comment).
    – SLM
    Aug 15, 2016 at 7:00

1 Answer 1

1

The first thing to note is that TeX typesets per paragraph; that means that page settings cannot be changed mid-paragraph. However, thanks to Donald Arseneau, there is a generic method of changing page settings between paragraphs --- the commands \onecolumn and \twocolumn force TeX to recalculate the settings. For example (after correcting any of my typos):

\documentclass{memoir}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\twocolumn  \addtolength{\textwidth}{1in} \onecolumn
\lipsum[2]% set in a wider \textwidth
\twocolumn  \addtolength{\textwidth}{-1in} \onecolumn
\lisum[[2]% back to the original \textwidth
\end{document}

No packages are required. Replace or add to the \addtolength{\textwidth}{...} macros to suit your purposes.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .