为什么 flalign 仍然有缩进,我怎样才能使它与 '\item' 行对齐

为什么 flalign 仍然有缩进,我怎样才能使它与 '\item' 行对齐
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[]{amsthm} %lets us use \begin{proof}
\usepackage[]{amssymb} %gives us the character \varnothing
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\begin{document}
\maketitle

\begin{enumerate}
\item $\sum_{i = 4}^{n} (4i^2+2i)$

    \begin{flalign*}
        \begin{split}
        &= \sum_{i = 4}^{n}4i^2+\sum_{i = 4}^{n}2i
        \\
        &= 4\sum_{i = 4}^{n}i^2+2\sum_{i = 4}^{n}i
        \\
        &= 4(\sum_{i = 0}^{n}i^2-\sum_{i = 0}^{4-1}i^2)+2(\sum_{i = 0}^{n}i-\sum_{i = 0}^{4-1}i)
        \\
        &= 4(\sum_{i = 0}^{n}i^2-\sum_{i = 0}^{3}i^2)+2(\sum_{i = 0}^{n}i-\sum_{i = 0}^{3}i)
        \\
        &= 4(\sum_{i = 0}^{n}i^2-0^2-1^2-2^2-3^2)+ 2(\sum_{i = 0}^{n}i-0-1-2-3)
        \\
        &= 4(\sum_{i = 0}^{n}i^2-0-1-4-9)+ 2(\sum_{i = 0}^{n}i-0-1-2-3)
        \\
        &= 4(\sum_{i = 0}^{n}i^2-14)+ 2(\sum_{i = 0}^{n}i-6)
        \\
        &= 4(\sum_{i = 0}^{n}i^2-14)+ 2(\sum_{i = 0}^{n}i-6)
        \\
        &= 4(\sum_{i = 0}^{n}i^2-14)+ 2(\sum_{i = 0}^{n}i-6)
    \end{split}
    \end{flalign*}

\item 
\end{enumerate}
\end{document}

答案1

像这样?

在此处输入图片描述

\documentclass{article}
%\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[fleqn]{amsmath}
\usepackage{amssymb} %gives us the character \varnothing
\usepackage{amsthm} %lets us use \begin{proof}

\begin{document}

\begin{enumerate}
\item $\begin{aligned}[t]
    \sum_{i = 4}^{n} (4i^2+2i)
        &= \sum_{i = 4}^{n}4i^2+\sum_{i = 4}^{n}2i  \\
        &= 4\sum_{i = 4}^{n}i^2+2\sum_{i = 4}^{n}i  \\
        &= 4\biggl(\sum_{i = 0}^{n}i^2-\sum_{i = 0}^{4-1}i^2\biggr)+2\biggl(\sum_{i = 0}^{n}i-\sum_{i = 0}^{4-1}i\biggr)          \\
        &= 4\biggl(\sum_{i = 0}^{n}i^2-\sum_{i = 0}^{3}i^2\biggr)+2\biggl(\sum_{i = 0}^{n}i-\sum_{i = 0}^{3}i\biggr)            \\
        &= 4\biggl(\sum_{i = 0}^{n}i^2-0^2-1^2-2^2-3^2\biggr)+ 2\biggl(\sum_{i = 0}^{n}i-0-1-2-3\biggr)                      \\
        &= 4\biggl(\sum_{i = 0}^{n}i^2-0-1-4-9\biggr)+ 2\biggl(\sum_{i = 0}^{n}i-0-1-2-3\biggr)                      \\
        &= 4\biggl(\sum_{i = 0}^{n}i^2-14\biggr)+ 2\biggl(\sum_{i = 0}^{n}i-6\biggr)    \\
        &= 4\biggl(\sum_{i = 0}^{n}i^2-14\biggr)+ 2\biggl(\sum_{i = 0}^{n}i-6\biggr)    \\
        &= 4\biggl(\sum_{i = 0}^{n}i^2-14\biggr)+ 2\biggl(\sum_{i = 0}^{n}i-6\biggr)
    \end{aligned}$

\item
\end{enumerate}
\end{document}

如您所见,方程式是内联模式。对于多行环境使用aligned环境。

相关内容