1

Is there an existing package that does the same thing as adjustwidth from changepage, but automatically switches inner and outer margins?

MWE:

\documentclass[twoside]{book} 
\usepackage{multicol} 
\usepackage{changepage} 
\usepackage{lipsum} 
\usepackage{showframe} 
\begin{document} 
\lipsum 
\begin{adjustwidth}{}{-7pc} 
\lipsum[3-56] 
\end{adjustwidth} 
\end{document}

The above document will always place extend the margins to the right by -7pc, for text within the adjustwidth environment.

If I use the adjustwidth* environment instead, then

  • If environment starts on an even page, then it will extend the margin to the left for the entire duration (since that is the local "outer margin" at the start of the enviornment)
  • If environment starts on an odd page, then it will extend the margin to the right for the entire duration.

What I want is an environment that extends always to the correct outer margin when the environment crosses page boundaries.

Willie Wong
  • 24,733
  • 8
  • 74
  • 106
Rajesh N
  • 829
  • It is rather hard to understand your question, especially with reference to "not new page" as your image shows a complete 2 page spread, with no margin change mid page. It is impossible to debug an image, it always helps if you provide a complete small test document and describe how you want the output to change. – David Carlisle Nov 18 '19 at 14:49
  • Please find my MWE example file is as follows, in this case I need extend outer margin 7pc both side(without starting newpage): \documentclass{book} \usepackage{multicol} \usepackage{changepage} \usepackage{lipsum} \usepackage{showframe} \begin{document}

    \lipsum

    \begin{adjustwidth}{-7pc}{0pc} \lipsum[3-56] \end{adjustwidth}

    \end{document}

    – Rajesh N Nov 18 '19 at 15:12
  • For what it is worth: there's an analogous command from KOMA (accessible using the scrextend package). It has the advantage that, when you run across a page boundary, it tells you: "A addmargin* environment starting on page 2 ends on page 10. This will result in potential wrong margins on every other page. So maybe you should change the addmargin* environment, that ends on input line 10." – Willie Wong Nov 18 '19 at 15:57

1 Answers1

2

This problem was solved by the fullwidth package, which was developed in response to the similar question asked here on TeX.SE.

The documentation for the package is a bit sparse, and so it took me a bit of experimenting to figure out how to get the effect you want.

Try the following:

\documentclass[twoside]{book} 
\usepackage{multicol} 
\usepackage{fullwidth}
\usepackage{lipsum} 
\usepackage{showframe} 
\begin{document} 
\lipsum 
\begin{fullwidth}[outermargin=-7pc, width=\linewidth+7pc]
\lipsum[3-56] 
\end{fullwidth} 
\end{document}
Willie Wong
  • 24,733
  • 8
  • 74
  • 106