2

I am trying to adjust margins inside my document. I have a rather unusual request: I would like to increase the outer margins in a specific section.

Example:

\documentclass[fontsize=9pt,a5paper,twoside,DIV=14,BCOR=7mm,headinclude=true,footinclude=true,headsepline,footsepline]{scrbook}
\usepackage{lipsum}
\begin{document}
\section{Sec1}
\lipsum[1-5]
\section{Sec2} % Here I would like an increased outer margin thoughout this section: Even page: increased left margin, Odd page: increased right margin
\begin{addmargin*}[2cm]{0pt} % This does not work with pagebreaks and inner instead of outer margins
    \lipsum[5-8]
\end{addmargin*}
\begin{addmargin*}[2cm]{0pt} % This does not work with pagebreaks and inner instead of outer margins
    \lipsum[5-8]
\end{addmargin*}
\section{Sec3} %normal 
\lipsum[6-10]

\end{document}

I use scrbook. In my first section, I would like to have normal margins. The second section should have:

  • Increased outer margins
  • Normal inner margins

Addmargin does not work for two reasons:

  1. It does not support pagebreaks
  2. I cannot adjust the outer margin

I fear I will have to adjust the pagelayout in order to achieve this. Does anybody have an Idea.

Thank you!

  • Welcome to TeX.SX! – BambOo Aug 8 '18 at 14:04
  • KOMA modifies margins by adjusting \leftskip and \rightskip (and possibly \lefmargin and \rightmargin). This is part of the paragraph formatting, so when a paragraph is split over two pages, the second half will retain the \leftskip from the previous page. flowfram is the only package which could handle even/odd page changes (as long as the column width is constant), but the frames have to be predefined in terms of x,y coordinates. – John Kormylo Aug 8 '18 at 15:20
  • Does your second (wider) section start on a new page and does the third (regular) section also start on a new page? If so there are several methods available to change the layout, the simplest being to swap from single to double column (or vice versa), change the layout and swap back to the original number of columns. – Peter Wilson Aug 8 '18 at 18:02
1

One can use \afterpage to effect the odd/even page change, but one must also manually break paragraphs across pages (hence \nopar). In this case, however, the break occurs between two paragraphs.

\documentclass[fontsize=9pt,a5paper,twoside,DIV=14,BCOR=7mm,headinclude=true,footinclude=true,headsepline,footsepline]{scrbook}
\usepackage{lipsum}
\usepackage{afterpage}

\newcommand{\nopar}{{\parskip=0pt\parfillskip=0pt\par}\pagebreak\noindent}% manually break a paragraph across pages

\begin{document}
\section{Sec1}
\lipsum[1-5]
\section{Sec2} % Here I would like an increased outer margin thoughout this section: Even page: increased left margin, Odd page: increased right margin
\leftskip=2cm
\afterpage{\global\leftskip=0pt \global\rightskip=2cm}
    \lipsum[5-6]\pagebreak
    \lipsum[7-8]
\rightskip=0pt
\section{Sec3} %normal 
\lipsum[6-10]

\end{document}
| improve this answer | |

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.