答案1
您可以使用\smashoperator
from mathtools
(我不推荐这样做)或将下标拆分为两行。或者,最好使用合适的符号。
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
\smashoperator[r]{\sum_{\text{$e$ into node $v$}}} f(e) =
\smashoperator[r]{\sum_{\text{$e$ out of node $v$}}} f(e)
\]
\[
\sum_{\substack{\text{$e$ into}\\\text{node $v$}}} f(e) =
\sum_{\substack{\text{$e$ out of}\\\text{node $v$}}} f(e)
\]
\[
\sum_{e\in v^{\leftarrow}} f(e) =
\sum_{e\in v^{\rightarrow}} f(e)
\]
\end{document}
答案2
我正在详细说明我对视觉格式的想法,当@Sebastiano 的使用\substack
建议更好的替代方案时......
% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly
% declare the paper format.
\usepackage[T1]{fontenc} % Not always necessary, but recommended.
\usepackage[utf8]{inputenc} % Not always necessary, but recommended.
% End of standard header. What follows pertains to the problem at hand.
\usepackage{mathtools}
\begin{document}
Some text before the equation.
\begin{align}
\sum_{\mathclap{\text{$e$ into node $v$}}} f(e)
\mspace{9mu}&=\mspace{9mu}
\sum_{\mathclap{\text{$e$ out of node $v$}}} f(e)
\\[\medskipamount]
\sum_{\mathclap{\substack{\text{$e$ into}\\\text{node $v$}}}} f(e) &=
\sum_{\mathclap{\substack{\text{$e$ out of}\\\text{node $v$}}}} f(e)
\end{align}
Some text after the equation.
\end{document}
输出:
答案3
这是一个使用包\smashoperator
的宏的解决方案mathtools
。请注意,现在求和符号和之间没有间隙f(e)
。但是,符号和第二个求和符号之间仍然有间隙=
,以保持较长的材料以下求和符号不会相互纠缠。
\documentclass{article}
\usepackage{mathtools} % for '\smashoperator' macro
\begin{document}
\[
\smashoperator{\sum_{\text{$r$ into node $v$}}} f(e) =
\smashoperator[r]{\sum_{\text{$e$ out of node $v$}}} f(e)
\]
\end{document}