Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
1  
Use the optional argument to tabular: \begin{tabular}[t]{...} –  egreg Sep 19 '11 at 20:05

1 Answer 1

up vote 5 down vote accepted

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}
share|improve this answer
    
Worked like a treat, thank you! –  nw. Sep 19 '11 at 19:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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