![我怎样才能在包含大量内联数学公式的下一段文字中产生均匀的行距?](https://linux22.com/image/479873/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E5%9C%A8%E5%8C%85%E5%90%AB%E5%A4%A7%E9%87%8F%E5%86%85%E8%81%94%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8F%E7%9A%84%E4%B8%8B%E4%B8%80%E6%AE%B5%E6%96%87%E5%AD%97%E4%B8%AD%E4%BA%A7%E7%94%9F%E5%9D%87%E5%8C%80%E7%9A%84%E8%A1%8C%E8%B7%9D%EF%BC%9F.png)
通常在一段文本中编写内联数学公式时,行距保持不变,但请考虑以下示例
使用以下代码生成
\begin {document}
\textbf{$c_0$ is a complete metric space.} Suppose $x $ is a limit point of $c_0$. Then there exists $(x^{(k)} )_{k \in \mathbb{N}} \in c_0$ and such that $x^{(k)} \to x$. Let $\epsilon>0$ and pick $N$ such that $\|x^(k)-x\|_\infty < \frac{1}{2} \epsilon$ for $k \ge N$. Since $x^{(N)} \in c_0$, there is some $N'$ such that $|x_i^{(N)} | < \frac{1}{2} \epsilon$ for $i \ge N'$. Then $|x_i| \le |x_i^{(N)} | +|x_i-x_i^{(N)} | \le |x_i^{(N)} | +\|x-x^{(N) } \|_\infty <\epsilon$. Hence $x_i \to 0$ and so $x \in c_0$.
\end {document}
是否可以对其进行格式化,以使普通文本之间的行距保持不变?
非常感谢所提供的任何帮助!
\documentclass[a4paper]{article}
\usepackage{amsfonts,amsmath,parskip}
\usepackage{ebgaramond} %font
\addtolength\textwidth{2cm} % I have not used this
\begin {document}
\textbf{$c_0$ is a complete metric space.} Suppose $x $ is a limit
point of $c_0$. Then there exists
$(x^{(k)} )_{k \in \mathbb{N}} \in c_0$ and such that $x^{(k)} \to
x$. Let $\epsilon>0$ and pick $N$ such that
$\|x^{(k)}-x\|_\infty < \frac{1}{2} \epsilon$ for $k \ge N$. Since
$x^{(N)} \in c_0$, there is some $N'$ such that
$|x_i^{(N)} | < \frac{1}{2} \epsilon$ for $i \ge N'$. Then
$|x_i| \le |x_i^{(N)} | +|x_i-x_i^{(N)} | \le |x_i^{(N)} | +\|x-x^{(N)
} \|_\infty <\epsilon$. Hence $x_i \to 0$ and so $x \in c_0$.
\end{document}
答案1
问题出在表达式上x_i^{(N)}
。你可以通过破坏下标来强制 TeX 降低指数,但这样括号就会与“i”发生冲突。这可以通过稍微降低下标来解决。
\documentclass[a4paper]{article}
\usepackage{amsfonts,amsmath,parskip}
\usepackage{ebgaramond} %font
%\usepackage{ebgaramond-maths}
%\let\epsilon\varepsilon
\addtolength\textwidth{2cm} % I have not used this
\newcommand{\ssub}[1]{_{\smash{\raisebox{-1pt}{$\scriptstyle#1$}}}}
\begin {document}
\emph{$c_0$ is a complete metric space.} Suppose $x $ is a limit
point of $c_0$. Then there exists
$(x^{(k)} )_{k \in \mathbb{N}} \in c_0$ and such that $x^{(k)} \to
x$. Let $\epsilon>0$ and pick $N$ such that
$\|x^{(k)}-x\|_\infty < \frac{1}{2} \epsilon$ for $k \ge N$. Since
$x^{(N)} \in c_0$, there is some $N'$ such that
$|x\ssub{i}^{(N)} | < \frac{1}{2} \epsilon$ for $i \ge N'$. Then
$|x\ssub{i}| \le |x\ssub{i}^{(N)} |
+|x\ssub{i}-x\ssub{i}^{(N)} | \le |x\ssub{i}^{(N)} | +\|x-x^{(N)
} \|_\infty <\epsilon$. Hence $x\ssub{i} \to 0$ and so $x \in c_0$.
\end{document}
我将粗体文本改为斜体:使用粗体 Garamond 是令人厌恶的。
取消注释上述代码中的两行也将使用 Garamond 进行数学运算。
使用不同的符号可能会改善外观。
\documentclass[a4paper]{article}
\usepackage{amsfonts,amsmath,parskip}
\usepackage{ebgaramond} %font
\usepackage{ebgaramond-maths}
\let\epsilon\varepsilon
\addtolength\textwidth{2cm} % I have not used this
\newcommand{\ssub}[1]{_{\smash{\raisebox{-1pt}{$\scriptstyle#1$}}}}
\begin {document}
\emph{$c_0$ is a complete metric space.} Suppose $x$ is a limit
point of $c_0$. Then there exists
$(x_k)_{k \in \mathbb{N}} \in c_0$ and such that $x_k \to x$.
Let $\epsilon>0$ and pick $N$ such that
$\|x_k-x\|_\infty < \epsilon/2$ for $k \ge N$. Since
$x_N \in c_0$, there is some $N'$ such that
$|x_{N,i}| < \epsilon/2$ for $i \ge N'$. Then
$|x_i| \le |x_{N,i}| + |x_i-x_{N,i}| \le |x_{N,i}| +\|x-x_N \|_\infty <\epsilon$.
Hence $x_i \to 0$ and so $x \in c_0$.
\end{document}
答案2
\documentclass[a4paper]{article}
\usepackage{amsfonts,amsmath,parskip}
\addtolength\textwidth{2cm}
\newcommand\test{%
\textbf{$c_0$ is a complete metric space.} Suppose $x $ is a limit
point of $c_0$. Then there exists
$(x^{(k)} )_{k \in \mathbb{N}} \in c_0$ and such that $x^{(k)} \to
x$. Let $\epsilon>0$ and pick zzzz $N_y$ such that
$\|x^{(k)}-x\|_\infty < \frac{1}{2} \epsilon$ for $k \ge N_{0}$. Since
$x^{(N)} \in c_0$, there is some $N'$ such that
$|x_i^{(N^2)} | < \frac{1}{2} \epsilon$ for $i \ge N'$. Then
$|x_i| \le |x_i^{(N)} | +|x_i-x_i^{(N)} | \le |x_i^{(N)} | +\|x-x^{(N)
} \|_\infty <\epsilon$. Hence $x_i \to 0$ and so $x \in c_0$.
}
\begin {document}
1 \test
{\lineskiplimit=-\maxdimen
2 \test
}
{\lineskiplimit=0pt \lineskip=0pt
3 \test
}
{\baselineskip=15pt
4 \test
}
5 \textbf{$c_0$ is a complete metric space.} Suppose $x $ is a limit
point of $c_0$. Then there exists
$(x^{(k)} )_{k \in \mathbb{N}} \in c_0$ and such that $x^{(k)} \to
x$. Let $\epsilon>0$ and pick zzzz $N_y$ such that
\[\|x^{(k)}-x\|_\infty < \frac{1}{2} \epsilon \quad\text{for $k \ge N_{0}$.}\]
Since
$x^{(N)} \in c_0$, there is some $N'$ such that
$|x_i^{(N^2)} | < \frac{1}{2} \epsilon$ for $i \ge N'$. Then
\[|x_i| \le |x_i^{(N)} | +|x_i-x_i^{(N)} | \le |x_i^{(N)} | +\|x-x^{(N)
} \|_\infty <\epsilon\;.\]
Hence $x_i \to 0$ and so $x \in c_0$.
\end{document}
1) 为原始版本(示例略有更改,以显示重叠)
2)使用-\maxdimen
此方法优先考虑等距行距一切包括可读性,如果需要,它将使线条重叠而没有任何警告。
3)使用 0pt 的设置\lineskiplimit
,因此如果确实需要,它将允许线条接触,但如果线条确实不适合空间,那么它将增加间距而不是过度打印。
4)(如果我真的必须将其设置为内联,我就会这么做)将行距打开到最小值,以允许所需的内联数学适合。
5)(如果可以选择的话我会这么做)使用显示的数学来表示更大的表达式。
答案3
如果你不介意浪费空间,你可以使用
\documentclass[a4paper]{article}
\usepackage{amsfonts,amsmath,parskip}
\usepackage{ebgaramond} %font
\addtolength\textwidth{2cm} % I have not used this
\begin {document}
{\baselineskip=1.2\baselineskip
\textbf{$c_0$ is a complete metric space.} Suppose $x $ is a limit
point of $c_0$. Then there exists
$(x^{(k)} )_{k \in \mathbb{N}} \in c_0$ and such that $x^{(k)} \to
x$. Let $\epsilon>0$ and pick $N$ such that
$\|x^{(k)}-x\|_\infty < \frac{1}{2} \epsilon$ for $k \ge N$. Since
$x^{(N)} \in c_0$, there is some $N'$ such that
$|x_i^{(N)} | < \frac{1}{2} \epsilon$ for $i \ge N'$. Then
$|x_i| \le |x_i^{(N)} | +|x_i-x_i^{(N)} | \le |x_i^{(N)} | +\|x-x^{(N)
} \|_\infty <\epsilon$. Hence $x_i \to 0$ and so $x \in c_0$.
\par}
\end{document}
可能有一种方法可以做到这一点\linespread
,但到目前为止我还没有找到方法。