How can I align using tabs in enumerate?

How can I get the a's to align?

This is what my text:

\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}


If you make take tex think that all your equations are of the same width, the a's will automatically line up:

\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}


Same technique used to align all other elements as well:

\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}


• And how to align the b and c part? Oct 15 '18 at 11:07
• @albert You can use the same mechanism to make them the same width by wrapping them in a \makebox Oct 15 '18 at 11:08
• @Delaila My pleasure to help you! Oct 15 '18 at 11:08