0

I'm new on using the memoir documentclass and I've been trying to implement a page layout with a large side margin, so I can have margin notes and margin figures, but I've been trying to create an environment that, for specific pages, I get rid of this margin. The code is as following:

\LoadClass[twoside, 11pt]{memoir}

\setstocksize{11in}{8.5in}
\settrims{0pt}{0pt}
\settypeblocksize{7.5in}{4.3in}{*}
\setlrmargins{1.5cm}{*}{*}
\setmarginnotes{20pt}{6.2cm}{0pt}

\checkandfixthelayout[nearest]


\newenvironment{fullwidth}{%
    \settrims{0pt}{0pt}
    \settypeblocksize{7.5in}{6in}{*}
    \setlrmargins{3.2cm}{*}{*}
    \setmarginnotes{0.01pt}{0.01pt}{0pt}

    \checkandfixthelayout[nearest]
}{%
    \settrims{0pt}{0pt}
    \settypeblocksize{7.5in}{4.3in}{*}
    \setlrmargins{1.5cm}{*}{*}
    \setmarginnotes{20pt}{6.2cm}{0pt}

  \checkandfixthelayout
}

It seems to work well, since the layout —visualized using \usepackage[showframe,pass]{geometry}— gets changed propertly, but the textwidth does not. How can I solve this issue?

1
  • Note that that env will not work as you cannot change the page layout mid page.
    – daleif
    May 7 at 13:38

1 Answer 1

2

As @daleif says you can't change the layout mid page, but perhaps memoir's adjustwidth environment is what you can use.

% textwidthprob.tex  SE 643343

\documentclass[letterpaper]{memoir}

\usepackage{lipsum}

\begin{document}
\lipsum[1]

%%% reduce local margins by 1cm and 2cm
%%% (increases local textwidth by 3cm)
\begin{adjustwidth}{-1cm}{-2cm}
  \lipsum[2]

  \lipsum[3]
\end{adjustwidth}

\lipsum[4]

\end{document}

enter image description here

The adjustwidth environment can cross page boundaries.

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.