我怎样才能使 a 对齐?
我的文字内容如下:
\begin{enumerate}[label=\alph*.]
\item $f(x)=x^2+6x+9$\tab{$a=1,\quad b=6,\quad c=9$}
\item $f(x)=2x^2+4x$\tab{$a=2,\quad b=4,\quad c=0$}
\item $f(x)=4x^2-12x+9$\tab{$a=4,\quad b=-12,\quad c=9$}
\item $f(x)=-6x^2-12x-1$\tab{$a=-6,\quad b=-12,\quad c=-1$}
\item $f(x)=-x^2+x-1$\tab{$a=-1,\quad b=1,\quad c=-1$}
\item $f(x)=-4x^2+3$\tab{$a=-4,\quad b=0,\quad c=3$}
\end{enumerate}
答案1
如果你让 take tex 认为你所有的方程式都是相同的宽度,那么a
's 将自动对齐:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\alph*.]
\item \makebox[5cm][l]{$f(x)=x^2+6x+9$} $a=1,\quad b=6,\quad c=9$
\item \makebox[5cm][l]{$f(x)=2x^2+4x$} $a=2,\quad b=4,\quad c=0$
\item \makebox[5cm][l]{$f(x)=4x^2-12x+9$} $a=4,\quad b=-12,\quad c=9$
\item \makebox[5cm][l]{$f(x)=-6x^2-12x-1$} $a=-6,\quad b=-12,\quad c=-1$
\item \makebox[5cm][l]{$f(x)=-x^2+x-1$} $a=-1,\quad b=1,\quad c=-1$
\item \makebox[5cm][l]{$f(x)=-4x^2+3$} $a=-4,\quad b=0,\quad c=3$
\end{enumerate}
\end{document}
同样的技术也用于对齐所有其他元素:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\alph*.]
\item \makebox[5cm][l]{$f(x)=x^2+6x+9$} \makebox[1.5cm][l]{$a=1,$}\makebox[1.6cm][l]{$b=6,$}$c=9$
\item \makebox[5cm][l]{$f(x)=2x^2+4x$} \makebox[1.5cm][l]{$a=2,$}\makebox[1.6cm][l]{$b=4,$}$c=0$
\item \makebox[5cm][l]{$f(x)=4x^2-12x+9$} \makebox[1.5cm][l]{$a=4,$}\makebox[1.6cm][l]{$b=-12,$}$c=9$
\item \makebox[5cm][l]{$f(x)=-6x^2-12x-1$} \makebox[1.5cm][l]{$a=-6,$}\makebox[1.6cm][l]{$b=-12,$}$c=-1$
\item \makebox[5cm][l]{$f(x)=-x^2+x-1$} \makebox[1.5cm][l]{$a=-1,$}\makebox[1.6cm][l]{$b=1,$}$c=-1$
\item \makebox[5cm][l]{$f(x)=-4x^2+3$} \makebox[1.5cm][l]{$a=-4,$}\makebox[1.6cm][l]{$b=0,$}$c=3$
\end{enumerate}
\end{document}