平均能量损失

平均能量损失

我正在通过 -package 将文档设置为 2 列multicol。这是一份类似报纸的文档。

我怎样才能强制 LaTeX 理想地删除尽可能多的额外添加的垂直橡胶空间,这些空间用于使同一页面上的段落之间的换行符和垂直间距看起来“一致”?

虽然对于某个部分来说,这种间距可能看起来不错,但对于其他部分来说,它似乎明显不同。这有点……不好。说实话,这不是最好的外观。

到目前为止我只发现此代码

\everypar=\expandafter{\the\everypar\loosness=-1}
\linepenalty=1000

(注:我知道有时候除非使用浮点数,否则这实际上是不可能的,但在多列环境中使用浮点数非常棘手——甚至不可能……我认为(基于阅读 TeX.sx 上的线程)。所以我只想尝试无论如何都要做一些别的事情。)

平均能量损失

\documentclass[
11pt,
a4paper,
false-,
]
{scrartcl}

\usepackage{
lmodern,
multicol,
blindtext,
mdframed,
}

\usepackage[svgnames]{xcolor}


\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\listfiles

\begin{document}
\begin{center}\huge
Title stuff
\end{center}

\begin{multicols*}{2}
\section{Word}

There really are some words.
And then some.
AAaaaa bbbb cccc.

Now here is something interesting: {asdf}.

\blindtext[1]

\begin{center}
\rule{\columnwidth}{10pt}
\end{center}

Some words to form a sentence.
There really are some words.
And then some.

%\addvspace{2ex}%
There really are some words.
And then some.

\begin{center}\color{DarkBlue}
\rule{\columnwidth}{10pt}
\end{center}

\blindtext[1]

\everypar=\expandafter{\the\everypar\loosness=-1}
\linepenalty=1000

\begin{center}
\fbox{
\begin{minipage}[t]{0.5\columnwidth}
1 - Some stuff.
Words and such.
There really are some words.
And then some.

There really are some words.
And then some.
\end{minipage}
}
\end{center}

\blindtext[1]

\begin{center}
\fbox{
\begin{minipage}[t]{0.5\columnwidth}
2 - Some stuff.
Words and such.
%There really are some words.
%And then some.

There really are some words.
And then some.
\end{minipage}
}
\end{center}

\blindtext[1]

\end{multicols*}
\end{document}

MWE 截图

在此处输入图片描述

在此处输入图片描述

答案1

据我所知,你主要想问的是上下间距,center也就是\partopsep段落之间的间距\topsep。将其设置为 0pt 会产生

在此处输入图片描述

\documentclass[
11pt,
a4paper,
%%%% ? false-,
]
{scrartcl}

\setlength\partopsep{0pt}
\setlength\topsep{0pt}

\usepackage{
lmodern,
multicol,
blindtext,
mdframed,
}

\usepackage[svgnames]{xcolor}


\usepackage[T1]{fontenc}
% not needed unless your latex is old \usepackage[utf8]{inputenc}


\listfiles

\begin{document}
\begin{center}\huge
Title stuff
\end{center}

\begin{multicols*}{2}
\section{Word}

There really are some words.
And then some.
AAaaaa bbbb cccc.

Now here is something interesting: {asdf}.

\blindtext[1]

\begin{center}
\rule{\columnwidth}{10pt}
\end{center}

Some words to form a sentence.
There really are some words.
And then some.

%\addvspace{2ex}%
There really are some words.
And then some.

\begin{center}\color{DarkBlue}
\rule{\columnwidth}{10pt}
\end{center}

\blindtext[1]

% commented out as it is too weird
%\everypar=\expandafter{\the\everypar\loosness=-1}
%\linepenalty=1000

\begin{center}
\fbox{
\begin{minipage}[t]{0.5\columnwidth}
1 - Some stuff.
Words and such.
There really are some words.
And then some.

There really are some words.
And then some.
\end{minipage}
}
\end{center}

\blindtext[1]

\begin{center}
\fbox{
\begin{minipage}[t]{0.5\columnwidth}
2 - Some stuff.
Words and such.
%There really are some words.
%And then some.

There really are some words.
And then some.
\end{minipage}
}
\end{center}

\blindtext[1]

\end{multicols*}
\end{document}

相关内容