文本超出边距的环境

文本超出边距的环境

发帖后这个封闭式问题,我找到了一个很好的解决方案在本页

但是,我的页边距设置与他使用的不同,因此,环境widematter仅在奇数页上正常工作;在偶数页上,宽幅文字会跑到错误的一侧,甚至会超出页面。有没有简单的方法来调试这个问题?

更新:

使用@daleif的建议,我得到以下MWE:

    \documentclass[11pt,a4paper]{memoir}

\setstocksize{297mm}{210mm}
\settrimmedsize{\stockheight}{195mm}{*}
\settypeblocksize{671.6pt}{335.8pt}{*}
%\settypeblocksize{675pt}{337.5pt}{*}
%\settypeblocksize{*}{28pc}{2}
\setlrmargins{*}{*}{4}
\setulmargins{*}{*}{2}
\setmarginnotes{5mm}{45.23mm}{\onelineskip}
\setlength{\footskip}{3.0\baselineskip}
\setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+1.0\marginparwidth\relax}
\checkandfixthelayout

\newlength{\extrawidth}
\setlength{\extrawidth}{\marginparsep}
\addtolength{\extrawidth}{\marginparwidth}

\marginparmargin{outer}
\strictpagechecktrue
\newenvironment{widematter}{
\begin{adjustwidth*}{0mm}{-\extrawidth}
\mpjustification}
{\end{adjustwidth*}}

\begin{document}
Here is some regular text that goes all the way to the margin and wraps around on the next line.
\begin{widematter}
Here is a test of the widematter environment, to see if the text is able to extend beyond the margin.
\end{widematter}
\end{document}

但这对于偶数页仍然不起作用 - 文本widematter延伸到右边距,而它应该延伸到左边距......

(此外,有什么方法可以在此 MWE 中插入分页符,以便我可以在偶数页上演示额外的宽度?)

另一更新:

使用 Marco Daniel 的fullwidth包,我得到以下 MWE:

\documentclass[11pt,a4paper]{memoir}

\setstocksize{297mm}{210mm}
\settrimmedsize{\stockheight}{195mm}{*}
\settypeblocksize{671.6pt}{335.8pt}{*}
%\settypeblocksize{675pt}{337.5pt}{*}
%\settypeblocksize{*}{28pc}{2}
\setlrmargins{*}{*}{4}
\setulmargins{*}{*}{2}
\setmarginnotes{5mm}{45.23mm}{\onelineskip}
\setlength{\footskip}{3.0\baselineskip}
\setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+1.0\marginparwidth\relax}
\checkandfixthelayout

\usepackage[innermargin=-2.0cm,]{fullwidth}

\begin{document}

Testing some regular text that goes on past the first line, and then repeats.
Testing some regular text that goes on past the first line, and then repeats.
Testing some regular text that goes on past the first line, and then repeats.

\begin{fullwidth}[width=\linewidth+2cm]

Testing some regular text that goes on past the first line, and then repeats.
Testing some regular text that goes on past the first line, and then repeats.
Testing some regular text that goes on past the first line, and then repeats.

\end{fullwidth}

\end{document}

第一次编译时,会出现未定义引用的警告,但fullwidth文本超出了右侧边距,这看起来不错。第二次编译时,警告消失了,但现在文本超出了左侧边距(错误的一侧)...

需要澄清的是:对于奇数页,左侧边距代表装订所需的空间,而右侧边距只是额外的空间(对于偶数页则相反)。使用这些设置,全宽会使文本延伸到装订边距,这很糟糕——我只希望它延伸到非装订边距。我尝试将代码更改为具有\usepackage[innermargin=0cm,]{fullwidth}\begin{fullwidth}[width=\linewidth-2cm],但这似乎仅适用于奇数页——偶数页仍然有全宽文本进入装订边距

答案1

我只会用

\marginparmargin{outer}
\strictpagechecktrue
\newenvironment{widematter}{
  \begin{adjustwidth*}{0mm}{-\extrawidth}
    \mpjustification
  }
  {\end{adjustwidth*}}

是的,adjustwidth*它不适用于跨两页的内容。它是一个通过列表创建的简单环境,主要缩进以允许用户放大或缩小(页面上的)局部区域。

下次请发布一些实际编译的内容,我们浪费了很多时间试图找到我们的水晶球并弄清楚人们的实际意思以及他们忘记包含哪些包。

答案2

如果你只想改变文本某一部分的边距(例如一个段落),我发现此解决方案很有帮助:

\addtolength{length_variable}{length}
....your text...

相关内容