如何处理大方程式?

如何处理大方程式?

我有一个方程组,方程很大(一行是不够的)。我找到了这个解决方案(第二个,来自 egreg如何对齐一组很长的方程式)来解决“如何对齐长方程式?”问题,但我仍然遇到一些麻烦。

我的方程式“仅仅”是不同元素的总和,其中一些元素是大乘积(同样,一行是不够的)。

示例(如何显示此代码的结果?)

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
    \begin{split}
        A &= AAAAAAAAAAAAAAAAAAAAAA \cdots \\
        &\qquad -BBBBBBBBBBBB\cdots\\
        & +\\
        &\qquad CCCCCCCCCCCCCCCCCCCCCCCCC\\
        & \times\\
        &\qquad CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
    \end{split}
    \begin{split}
        A &= AAAAAAAAAAAAAAAAAAAAAA \cdots \\
        &\qquad -BBBBBBBBBBBB\cdots\\
        & +\\
        &\qquad CCCCCCCCCCCCCCCCCCCCCCCCC\\
        & \times\\
        &\qquad CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
    \end{split}
\end{align}
\end{document}

在这种情况下,惯例是什么?如果可能的话,我想将+and居中x,并可能为 (CCCC x CCCC) 添加括号,以表明它只是总和的一个元素。我想我必须将一个环境嵌套在另一个环境中,但我不知道是哪些环境。

我尝试了一些方法,但没有成功,但它可能会帮助你理解我的意思尝试 1

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
    \begin{split}
        A &= AAAAAAAAAAAAAAAAAAAAAA \cdots \\
        &\qquad -BBBBBBBBBBBB\cdots\\
        & \center{+}\\
        \left\(\begin{split}
            &\qquad CCCCCCCCCCCCCCCCCCCCCCCCC\\
            & \center{\times}\\
            &\qquad CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
        \end{split}\right\)
    \end{split}
\end{align}
\end{document}

尝试 2

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
    \begin{split}
        A &= AAAAAAAAAAAAAAAAAAAAAA \cdots \\
        &\qquad -BBBBBBBBBBBB\cdots\\
        & \center{+}\\
        \left\(\begin{gather}
            \qquad CCCCCCCCCCCCCCCCCCCCCCCCC\\
             \center{\times}\\
            \qquad CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
        \end{gather}\right\)
    \end{split}
\end{align}
\end{document}

编辑 :

根据要求:以下是一些图片,以展示我的想法。这可能不是标准,如果是这样,请告诉我什么是“正确”的方法。

我想要的输出

这是一个真实等式的例子。

在此处输入图片描述

第一个没有乘法符号,而且项太长。但如果我添加符号并自动切分方程(对于大且多的方程式使用方程式和案例) 方程不太清楚。

编辑 2 根据要求:这是重现“真实”问题的代码(不是我展示的方程式)

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
    \begin{split}
        \dot{\text{R5P}} =& \nu_\text{maxVG6PDH}\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}} \\
        +& \nu_\text{maxVG6PDH}\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}} \\
        -& \nu_\text{maxVG6PDH}\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}} \\
    \end{split}\\
    \begin{split}
        \dot{\text{R5P}} =& \nu_\text{maxVG6PDH}\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}} \\
        +& \nu_\text{maxVG6PDH}\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}} \\
        -& \nu_\text{maxVG6PDH}\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}}\cdot\frac{G6P}{K_{mG6P}^{VG6PDH}} \\
    \end{split}
\end{align}

\end{document}

答案1

很难从显示的代码中猜测预期的输出。下面的代码运行没有错误,并产生以下看起来有点奇怪的输出,希望这能给你一个正确的方向。

在此处输入图片描述

\documentclass[a4paper]{article}
\usepackage{mathtools}

\begin{document}
\begin{align*}
        A &= AAAAAAAAAAAAAAAAAAAAAA \cdots \\
        &\qquad -BBBBBBBBBBBB\cdots\\
        &+\\
        &\left(\begin{gathered}
            CCCCCCCCCCCCCCCCCCCCCCCCC\\
             \times\\
             CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
    \end{gathered}\right)
\end{align*}
\end{document}

答案2

我建议你使用breqn包,它是专门为排版长方程式而设计的,具有自动换行和改进对齐的功能。

我不清楚所需的输出,但我在下面提供了一个示例(以及背页),使用dgroup*,带有dmath*子环境。您应该能够修改它以获得所需的效果:

\documentclass[a4paper]{article}

\usepackage{breqn}

\begin{document}
  \begin{dgroup*}
      \begin{dmath*}
          A = AAAAAAAAAAAAAAAAAAAAAA \cdots
          \qquad -BBBBBBBBBBBB\cdots
          +
          \qquad CCCCCCCCCCCCCCCCCCCCCCCCC
          \times
          \qquad CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
      \end{dmath*}
      \begin{dmath*}
          A = AAAAAAAAAAAAAAAAAAAAAA \cdots
          \qquad -BBBBBBBBBBBB\cdots
          +
          \qquad CCCCCCCCCCCCCCCCCCCCCCCCC
          \times
          \qquad CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
      \end{dmath*}
  \end{dgroup*}
\end{document}

使用 pdflatex 编译上述代码的结果图像。

答案3

您至少可以将整个线宽用于单个术语:

\documentclass[a4paper]{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
    &A1 = \notag \\
    &\begin{aligned}
        & AAAAAAAAAAAAAAAAAAAAAA \cdots \\
        & -BBBBBBBBBBBB\cdots\\
        & +CCCCCCCCCCCCCCCCCCCCCCCCC\\
        & \times CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
    \end{aligned} \\[1ex]
    &A2 = \notag \\
    &\begin{aligned}
        & AAAAAAAAAAAAAAAAAAAAAA \cdots \\
        & -BBBBBBBBBBBB\cdots\\
        & +CCCCCCCCCCCCCCCCCCCCCCCCC\\
        & \times CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
    \end{aligned} 
\end{align}

\end{document}

在此处输入图片描述

答案4

这有帮助吗?我提出两种解决方案,第一种使用alignsplit,第二种使用multline

align和的示例split

示例1

例如multline

示例2

生成两者的代码:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
You could use \texttt{align} with \texttt{split}.
\begin{align}
  \begin{split}
    \dot{R5P} =& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}
  \end{split} \\
  \begin{split}
    \dot{R5P} =& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
              +& v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}
  \end{split}
\end{align}
\newpage
Or you could use \texttt{multline} environment.
\begin{multline}
  \dot{R5P} = v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}
\end{multline}
\begin{multline}
  \dot{R5P} = v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}\\
            + v_{max} \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}} \cdot \frac{G6P}{K_{mG6P}^{VG6PDH}}
\end{multline}
\end{document}

请注意,如果您想要更多自定义,则需要方程的实际代码。我指的是页面中放不下的简单方程的代码。

相关内容