使用对齐对公式进行左对齐

使用对齐对公式进行左对齐

我使用方程式来编写我的注释集。但是当我使用时aligned,它没有显示左对齐。这是我的代码:

\begin{equation}
\begin{aligned}
Comments=\{\{7322,{""}\},\{7424,\text{"remove unnecessary default editor parts"},\\ \text{"Add the updated Bugzilla people part"}\}\\, \{7696,\text{"remove unnecessary default editor parts"},\\ \text{"Add the updated Bugzilla people part"},\text{"Add Bugzilla vote Planning part"}\} ,\\ \{8045,\text{"Task Submit Error"},\text{"Please enter a short summary before submitting"},\\ \text{"Please select a component before submitting"},\\,
\{8565,\text{"org.eclipse.mylyn.bugzilla.ui.editors.part.flags"}\\,\text{"org.eclipse.mylyn.bugzilla.ui.editors.part.planning"},\\ \text{"Force the most recent known good token onto the outgoing task data to ensure submit"}\}\\,
\{\{7710,7691\}\text{"remove unnecessary default editor parts"},\\ \text{"Add the updated Bugzilla people part"},\text{"Add Bugzilla vote Planning part"},\\ \text{"org.eclipse.mylyn.bugzilla.ui.editors.part.flags"}\}\}\}
\end{aligned}
\nonumber
\end{equation} 

我怎样才能实现左对齐?

答案1

看起来这里没有数学。tabbing环境似乎更合适。

\documentclass{article}
\begin{document}
\begin{tabbing}
Comments = \= \{\{7322,`` ''\},\{7424,``remove unnecessary default editor parts'',\\
 \>``Add the updated Bugzilla people part''\},\\
 \>\{7696,``remove unnecessary default editor parts'',\\
 \>``Add the updated Bugzilla people part'',
  ``Add Bugzilla vote Planning part''\},\\
 \>\{8045,``Task Submit Error'',
  ``Please enter a short summary before submitting'',\\
 \>``Please select a component before submitting'',\\
 \>\{8565,``org.eclipse.mylyn.bugzilla.ui.editors.part.flags'',\\
 \>``org.eclipse.mylyn.bugzilla.ui.editors.part.planning'',\\
 \>``Force the most recent known good token onto the outgoing task data to ensure submit''\},\\
 \>\{\{7710,7691\}``remove unnecessary default editor parts'',\\
 \>``Add the updated Bugzilla people part'',``Add Bugzilla vote Planning part'',\\
 \>``org.eclipse.mylyn.bugzilla.ui.editors.part.flags''\}\}\}
\end{tabbing}
\end{document}

示例代码的输出

答案2

可能经过这种类型的对齐,使用直接的align*

在此处输入图片描述

\documentclass{article}
\usepackage[maaargin=1in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
\text{Comments} ={}& \{\{7322, \text{`` ''}\}, \{7424, \text{``remove unnecessary default editor parts''}, \\
  & \text{``Add the updated Bugzilla people part''} \}, \\
  & \{7696, \text{``remove unnecessary default editor parts''}, \\
  & \text{``Add the updated Bugzilla people part''}, \text{``Add Bugzilla vote Planning part''} \}, \\
  & \{8045, \text{``Task Submit Error''}, \text{``Please enter a short summary before submitting''}, \\
  & \text{``Please select a component before submitting''}, \\
  & \{8565, \text{``org.eclipse.mylyn.bugzilla.ui.editors.part.flags''}, \\
  & \text{``org.eclipse.mylyn.bugzilla.ui.editors.part.planning''}, \\
  & \text{``Force the most recent known good token onto the outgoing task data to ensure submit''} \}, \\
  & \{ \{ 7710, 7691 \}, \text{``remove unnecessary default editor parts''}, \\
  & \text{``Add the updated Bugzilla people part''}, \text{``Add Bugzilla vote Planning part''}, \\
  & \text{``org.eclipse.mylyn.bugzilla.ui.editors.part.flags''} \} \} \}
\end{align*}
\end{document}

公式太宽了,但我不确定你的文档尺寸是多少。我认为一定有更好的方法来呈现信息,但如果没有更多的背景信息,就很难说。

答案3

为什么不直接使用堆栈,而忘记数学模式呢?

\documentclass[margin=2pt]{standalone}
\usepackage[usestackEOL]{stackengine}
\usepackage{amsmath}
\begin{document}
Comments = \Longunderstack[l]{%
\{\{7322,{""}\},\{7424,\text{"remove unnecessary default editor parts"},\\ \text{"Add the updated Bugzilla people part"}\}\\, \{7696,\text{"remove unnecessary default editor parts"},\\ \text{"Add the updated Bugzilla people part"},\text{"Add Bugzilla vote Planning part"}\} ,\\ \{8045,\text{"Task Submit Error"},\text{"Please enter a short summary before submitting"},\\ \text{"Please select a component before submitting"},\\,
\{8565,\text{"org.eclipse.mylyn.bugzilla.ui.editors.part.flags"}\\,\text{"org.eclipse.mylyn.bugzilla.ui.editors.part.planning"},\\ \text{"Force the most recent known good token onto the outgoing task data to ensure submit"}\}\\,
\{\{7710,7691\}\text{"remove unnecessary default editor parts"},\\ \text{"Add the updated Bugzilla people part"},\text{"Add Bugzilla vote Planning part"},\\ \text{"org.eclipse.mylyn.bugzilla.ui.editors.part.flags"}\}\}\}
}
\end{document}

在此处输入图片描述

相关内容