我正在尝试调整文档内的边距。我有一个相当不寻常的要求:我想增加特定部分的外边距。
例子:
\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}
我使用 scrbook。在我的第一部分中,我希望有正常边距。第二部分应该有:
- 外边缘增加
- 正常内边距
Addmargin 不起作用有两个原因:
- 不支持分页符
- 我无法调整外边距
我担心我必须调整页面布局才能实现这一点。有人有什么想法吗?
谢谢你!
答案1
可以使用\afterpage
来实现奇数/偶数页的切换,但也必须手动跨页分段(因此\nopar
)。但是,在这种情况下,分段发生在两个段落之间。
\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}