KOMA 脚本 - 加宽文本宽度

KOMA 脚本 - 加宽文本宽度

我有一张长桌,宽度约为 14 厘米,文字宽度为 12 厘米。因此,我想将两页上的文字宽度加宽 2 厘米,朝向页面的外边缘。我“发现”有addmarginaddmargin*环境,但我不知道如何使用它们。我尝试了各种参数组合,但没有成功。有什么想法吗?

谢谢

梅威瑟:

\documentclass[11pt]{scrbook}
\usepackage{longtable}

\usepackage[paperwidth=210mm,paperheight=255mm,top=20mm,bottom=25mm,inner=25mm,outer=65mm,marginparsep=7mm,marginparwidth=48mm,headsep=4mm,headheight=6mm]{geometry}

\begin{document}

more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more text

\begin{addmargin*}[0cm]{-2cm}
\begin{longtable}{llll}
\hline
\hline
text & text & more and more and more text & more and and more and more text \\
\hline
\endhead

\hline
\hline
\endfoot

text & text & more and more and more text & more and and more and more text \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
text & text & more and more and more text & more and and more and more text \\
\end{longtable}
\end{addmargin*}

more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more text

\end{document}enter code here

答案1

我有另一个解决方案,见下文。我决定不删除我 2013 年 10 月 19 日的回答,因为我们发现这addmargin*无法与 longtable 配合使用,而且\LTleftlongtable 包也没有太大帮助。

也许我们可以反过来解决这个问题:如果你能把长表放在标题下面,那么你可以\newgeometry从这个标题开始,外边距减少 20 毫米。要隐藏它,请把你的文本在 addmargin* 环境中,但不在表中。然后恢复以前的几何形状。

看起来像这样:

\documentclass[11pt]{scrbook}
\usepackage{longtable, blindtext}

\usepackage[paperwidth=210mm,paperheight=255mm,top=20mm,bottom=25mm,inner=25mm,outer=65mm,marginparsep=7mm,marginparwidth=48mm,headsep=4mm,headheight=6mm]{geometry}

\begin{document}

\blinddocument


\newgeometry{paperwidth=210mm,paperheight=255mm,top=20mm,bottom=25mm,inner=25mm,outer=45mm,
  marginparsep=7mm,marginparwidth=48mm,headsep=4mm,headheight=6mm}

\section{Tabulars}
\label{sec:tabulars}


\begin{addmargin*}[0cm]{2cm}
more and more and more and more and more and more and more and more
and more and more and more and more and more and more and more and
more and more and more and more and more and more and more and more
and more and more and more and more and more and more and more text
\end{addmargin*}

\begin{longtable}{llll}
\hline
\hline
text & text & more and more and more text & more and and more and more text \\
\hline
\endhead

\hline
\hline
\endfoot

text & text & more and more and more text & more and and more and more text \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
% & & a& \\
% & & a& \\
% & & a& \\
% & & a& \\
% & & a& \\
% & & a& \\
% & & a& \\
% & & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
& & a& \\
text & text & more and more and more text & more and and more and more text \\
\end{longtable}


\begin{addmargin*}[0pt]{2cm}
  more and more and more and more and more and more and more and more
  and more and more and more and more and more and more and more and
  more and more and more and more and more and more and more and more
  and more and more and more and more and more and more and more text
\end{addmargin*}

\restoregeometry

\blinddocument


\end{document}

由于分页符与 相连\newgeometry,因此这不是一个完美的解决方案\restoregeometry,但也许您可以在进行最终布局时处理它。

答案2

[[ 如果没有其他帮助,可以考虑查阅手册(在命令行上使用 »texdoc komascript« 获取,然后搜索 »addmargin«)。但是:

\begin{addmargin*}[0cm]{-2cm}
 \begin{longtable}...
  ...
 \end{longtable}
\end{addmargin*}

如果不起作用,请提供 MWE。]]

我错了:


编辑

抱歉。你写道,你一无所知,而我误解了这一点。

除此之外,不确定 addmargin 和 longtable,请参阅这里,也许你懂德语。Markus Kohm 提供了一个不使用 addmargin 的解决方案示例,但我没有检查它:

\setlength{\LTleft}{-1cm}
\begin{longtable}{|c|c|c|}
\captionabove{Beschriftung der Tabelle}\\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
Dies ist der Test & Dies ist der Test & Dies ist der Test \\
\end{longtable}

我找到了一篇帖子(http://www.komascript.de/node/1629) Markus 或多或少地表示 addmargin 环境中的 longtable 不起作用。

相关内容