分割环境中心方程的数量

分割环境中心方程的数量

我有一个多行方程,其长度足够将方程的数字推到底部:

\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{amssymb, amsthm, amsmath, amsfonts, eurosym, newtxmath, nccmath}
\usepackage{geometry}
\geometry{left = 1.0in, right = 1.0in, top = 1.0in, bottom = 1.0in}

\begin{document}

\begin{equation}
    \begin{split}
            myverylongequation & =  something that is very long \\
%
            & =   something that is more or less long \\
%
            & =   something that is more or less long \\
%
            & = something that is very very very very very very very very very very very very long \\
    \end{split}
\end{equation}

\end{document}

我想要实现的是让方程的数字“居中”,如下例所示:

\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{amssymb, amsthm, amsmath, amsfonts, eurosym, newtxmath, nccmath}
\usepackage{geometry}
\geometry{left = 1.0in, right = 1.0in, top = 1.0in, bottom = 1.0in}

\begin{document}

\begin{equation}
    \begin{split}
            myshortequation & =  something that is short \\
%
            & =   something that is short \\
%
            & =   something that is short \\
%
            & = something that is short \\
    \end{split}
\end{equation}

\end{document}

答案1

如果您对最后一行超出右边距感到满意,请使用第一个解决方案。通过实验微调该因子。

如果可以分割的话就更好了。

\documentclass[12pt]{article}

%\usepackage[utf8]{inputenc}% not necessary
\usepackage{amssymb, amsthm, amsmath}
\usepackage{newtxtext,newtxmath}
\usepackage{geometry}
\geometry{left = 1.0in, right = 1.0in, top = 1.0in, bottom = 1.0in,
  showframe % for seeing the margins
}

\newcommand{\fakewidth}[2]{%
  \makebox[#1\displaywidth][l]{\makebox[0pt][l]{$\displaystyle#2$}}%
}

\begin{document}

\begin{equation}
  \begin{split}
    myverylongequation
    & = something that is very long \\
    & = something that is more or less long \\
    & = something that is more or less long \\
    & = \fakewidth{0.65}{something that is very very very very very very very very very very very long}
  \end{split}
\end{equation}

\begin{equation}
  \begin{split}
    myverylongequation
    & = something that is very long \\
    & = something that is more or less long \\
    & = something that is more or less long \\
    & = \begin{aligned}[t]
          & something that is very very very very very \\
          & very very very very very very long
        \end{aligned}
  \end{split}
\end{equation}


\end{document}

在此处输入图片描述

相关内容