使用 latex 对齐方程

使用 latex 对齐方程
% !TeX spellcheck = en_US

\documentclass[11pt,twoside]{book}
\usepackage{amsmath}
\usepackage{array,tabularx}
\newenvironment{conditions*}
{\par\vspace{\abovedisplayskip}\noindent
    \tabularx{\columnwidth}{>{$}l<{$} @{${}:{}$} >{\raggedright\arraybackslash}X}}
{\endtabularx\par\vspace{\belowdisplayskip}}
\begin{document}

\begin{equation}
A =  C+D
\end{equation}

    where:
    \begin{conditions*}
        A & blabla \\
        C & blabla \\
        D & blabla \\
    \end{conditions*}
    \end{document}

我想写:

where A: blabla
      B: blabla
      C: blabla

答案1

尝试这个:

\documentclass[11pt,twoside]{book}% Use this line for the print version of the
    \usepackage{amsmath}
    \usepackage{array,tabularx}

    \usepackage{lipsum}% for dummy text

\newenvironment{conditions*}
{%\par\vspace{\abovedisplayskip}% <-- superfluous
\noindent\tabularx{\columnwidth}[t]{>{$}r<{$:}  
                                    >{\raggedright\arraybackslash}X}}
{\endtabularx\par\vspace{\belowdisplayskip}}
\begin{document}
    \lipsum[1]
\begin{equation}
A =  C+D
\end{equation}
%
where:
    \begin{conditions*}
        A & blabla \\
        C & blabla \\
        D & blabla \\
    \end{conditions*}
\lipsum[4]
    \end{document}

结果:

在此处输入图片描述

相关内容