fleqn 长公式的奇怪行为

fleqn 长公式的奇怪行为

我有一个文档,其中包含几个不同长度的公式,我需要将它们左对齐。为了实现这一点,我使用了fleqn中的选项\documentclass。它对大多数公式都按预期工作,但最长的公式没有缩进,就好像它们不是分开写在一行上的一样:

MWE 图像

我怎样才能修复这个问题而不破坏更多行的公式?


平均能量损失

\documentclass[fleqn]{article}

\usepackage{indentfirst}
\usepackage{amsmath}

\begin{document}
\subsection*{Lorem ipsum sit amet}
Short formula: aligned as wanted (the quick brown fox jumps over the lazy dog and the quick brown fox jumps over the lazy dog)
\[\begin{split}
    V_{x}           & = \frac{V_{0} - \sum_{m}^{n}Sp + \sum_{m}^{n}Pr} {q^{(n-m)}} = \\
                    & = 10000
\end{split}\]

Longer formula: aligned as wanted (the quick brown fox jumps over the lazy dog and the quick brown fox jumps over the lazy dog)
\[\begin{split}
    \sum_{x}^{y}Sp & = \bigg(1000\frac{q^a-1}{r}q^{b}
                        + 2000\frac{q^{c}-1}{r}q^d\bigg)
                        + \bigg(3000\frac{q^e-1}{r}q
                        + 4000\bigg) = \\
                    & = 5000
\end{split}\]

Even longer formula: oddly aligned (the quick brown fox jumps over the lazy dog and the quick brown fox jumps over the lazy dog)
\[\begin{split}
    \sum_{x}^{y}Pr & = \bigg(100000\frac{q^a-1}{r}q^{b}
                        + 200000\frac{q^{c}-1}{r}q^d\bigg)
                        + \bigg(300000\frac{q^e-1}{r}q
                        + 400000\bigg) = \\
                    & = 500000
\end{split}\]

\end{document}

答案1

没有奇怪的行为。公式不符合该线,LaTeX 会尽力适应它。

分割过长的线。

注意。使用\biggland \biggr,而不是未加修饰的\bigg。另外,通常不会重复等号(但您的印刷传统可能会要求这样做;请尽量避免这样做,因为没有必要)。

\documentclass[fleqn]{article}

\usepackage{indentfirst}
\usepackage{amsmath}

\begin{document}
\subsection*{Lorem ipsum sit amet}
Short formula: aligned as wanted (the quick brown fox jumps over the 
lazy dog and the quick brown fox jumps over the lazy dog)
\[\begin{split}
    V_{x}           & = \frac{V_{0} - \sum_{m}^{n}Sp + \sum_{m}^{n}Pr} {q^{(n-m)}} \\
                    & = 10000
\end{split}\]

Longer formula: aligned as wanted (the quick brown fox jumps over the 
lazy dog and the quick brown fox jumps over the lazy dog)
\[\begin{split}
    \sum_{x}^{y}Sp & = \biggl(1000\frac{q^a-1}{r}q^{b}
                        + 2000\frac{q^{c}-1}{r}q^d\biggr)
                        + \biggl(3000\frac{q^e-1}{r}q
                        + 4000\biggr)\\
                    & = 5000
\end{split}\]

Even longer formula: oddly aligned (the quick brown fox jumps over the 
lazy dog and the quick brown fox jumps over the lazy dog)
\[\begin{split}
    \sum_{x}^{y}Pr & = \biggl(100000\frac{q^a-1}{r}q^{b}
                        + 200000\frac{q^{c}-1}{r}q^d\biggr) \\
                  &\qquad+ \biggl(300000\frac{q^e-1}{r}q
                        + 400000\biggr) \\
                    & = 500000
\end{split}\]

\end{document}

在此处输入图片描述

相关内容