我怎样才能在包含大量内联数学公式的下一段文字中产生均匀的行距?

我怎样才能在包含大量内联数学公式的下一段文字中产生均匀的行距?

通常在一段文本中编写内联数学公式时,行距保持不变,但请考虑以下示例

在此处输入图片描述

使用以下代码生成

\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,但到目前为止我还没有找到方法。

相关内容