7

I am just getting started using latex and am having some problem vertically aligning the enumerate labels when listing tables (see image below). I would like to have the '(a)' label aligned vertically with the table, rather than being centered vertically.

enter image description here

This is what I have so far:

\begin{enumerate}[label=(\alph*)]
\item 
    \begin{tabular}{c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c}
    & & & & 1 & 1 & 0 & 1 \\
    $ \times$ & & & & 1 & 0 & 0 & 1 \\
    \hline
    & & & & 1 & 1 & 0 & 1 \\
    & & & & & & 0 & \\
    & & & & & 0 & & \\
    + & 1 & 1 & 0 & 1 & & & \\
    \hline
    & 1 & 1 & 1 & 0 & 1 & 0 & 1 \\
    \end{tabular}
\end{enumerate}
  • 1
    Use the optional argument to tabular: \begin{tabular}[t]{...} – egreg Sep 19 '11 at 20:05
5

You can use the optional argument of tabular to indicate the vertical alignment; in your case, the t option is required:

\documentclass{book}
\usepackage{enumitem}

\begin{document}

\begin{enumerate}[label=(\alph*)]
\item 
    \begin{tabular}[t]{c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c@{\,}c}
    & & & & 1 & 1 & 0 & 1 \\
    $ \times$ & & & & 1 & 0 & 0 & 1 \\
    \hline
    & & & & 1 & 1 & 0 & 1 \\
    & & & & & & 0 & \\
    & & & & & 0 & & \\
    + & 1 & 1 & 0 & 1 & & & \\
    \hline
    & 1 & 1 & 1 & 0 & 1 & 0 & 1 \\
    \end{tabular}
\end{enumerate}

\end{document}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.