这个问题是基于如何写出完美的方程参数描述?问题:
我希望使用 来定义参数,\singlespacing
就像我目前用于\doublespacing
论文间距一样。建议的conditions
和conditions*
环境都非常有用,我也尝试调整 来conditions*
反映no break after where:
我希望实现的变体。
\singlespacing
按照我的做法进行定义会导致conditions
出现不必要的缩进和missing \endgroup inserted
错误,尽管从视觉上看它是可行的
conditions*
通过调整上述变体来定义我也会导致不必要的缩进,而且我无法弄清楚如何插入\singlespacing
参数而不导致错误。
以下是我所做的所有修改后的 MWE:
\documentclass{scrreprt}
\usepackage{array,tabularx}
\usepackage{setspace}
\doublespace
\newenvironment{conditions}[1][where:]
{\singlespace#1 \begin{tabular}[t]{>{$}l<{$} @{${}:{}$} l}}
{\doublespace\end{tabular}\\[\belowdisplayskip]}
\newenvironment{conditions*}[1][where:]
{#1 \begin{tabular}[t]{>{$}l<{$} @{}>{${}}c<{{}$}@{} l}}
{\end{tabular}\\[\belowdisplayskip]}
\begin{document}
An equation just to start
\begin{equation}
P+N=S_{d}
\end{equation}
\begin{conditions}
P & notional permeability factor \\
N & number of waves \\
S_{d} & damage level
\end{conditions}
Some text after the equation.
Another equation with symbols
\begin{equation}
P+N=S_{d}
\end{equation}
\begin{conditions*}
P & : & notional permeability factor \\
N & \sim & number of waves \\
S_{d} & \propto & damage level
\end{conditions*}
and so this is where we continue with some more text after the equation.
\end{document}
答案1
在双倍行距文档中寻找印刷美感是一场预先的失败之战。
你可以用如下方法限制损失:
\documentclass{scrreprt}
\usepackage{array,tabularx}
\usepackage{setspace}
\newenvironment{conditions}[1][where:]
{\begin{minipage}{\textwidth}
\vspace*{-.5\belowdisplayskip}%
\linespread{1}\selectfont #1 \begin{tabular}[t]{>{$}l<{$} @{${}:{}$} l}}
{\end{tabular}\end{minipage}\\[\belowdisplayskip]}
\newenvironment{conditions*}[1][where:]
{\begin{minipage}{\textwidth}
\vspace*{-.5\belowdisplayskip}%
\linespread{1}\selectfont #1 \begin{tabular}[t]{>{$}l<{$} @{}>{${}}c<{{}$}@{} l}}
{\end{tabular}\end{minipage}\\[\belowdisplayskip]}
\doublespacing
\begin{document}
An equation just to start
An equation just to start
An equation just to start
An equation just to start
\begin{equation}
P+N=S_{d}
\end{equation}
\begin{conditions}
P & notional permeability factor \\
N & number of waves \\
S_{d} & damage level
\end{conditions}
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.
Some text after the equation.
Another equation with symbols
Another equation with symbols
Another equation with symbols
Another equation with symbols
Another equation with symbols
Another equation with symbols
\begin{equation}
P+N=S_{d}
\end{equation}
\begin{conditions*}
P & : & notional permeability factor \\
N & \sim & number of waves \\
S_{d} & \propto & damage level
\end{conditions*}
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
and so this is where we continue with some more text after the equation.
\end{document}
请注意,正确的命令是\doublespacing
,而不是\doublespace
。