[Tex/LaTex] Vertical alignment of tabular to baseline in an itemize environment

liststablesvertical alignment

I have a tabular inside an itemize environment:

\documentclass{article}
\begin{document}
    \begin{itemize}
        \item[(b)]
        \begin{tabular}{|c|c|}
            ...
        \end{tabular}
    \end{itemize}
\end{document}

It looks like this:

wrong

But I want it to look like this:

correct

I.e. I want to align the top of the table to the present item baseline. How?

Best Answer

Consider using adjustbox to vertically align the tabulars to the \items as the default [t]op and [b]ottom alignments when including horizontal rules - \hlines - influences it:

enter image description here

\documentclass{article}

\usepackage{adjustbox}

\begin{document}

\begin{enumerate}
  \item
    \adjustbox{valign=t}{\begin{tabular}{|c|c|}
      \hline
      Lorem & Ipsum \tabularnewline
      \hline
      One  &\tabularnewline
      Two  & Wow \tabularnewline
      Three& \tabularnewline
      \hline
    \end{tabular}}
    \qquad
    \begin{tabular}[t]{|c|c|}
      \hline
      Lorem & Ipsum \tabularnewline
      \hline
      One  &\tabularnewline
      Two  & Wow \tabularnewline
      Three& \tabularnewline
      \hline
    \end{tabular}

  \item
    \adjustbox{valign=b}{\begin{tabular}{|c|c|}
      \hline
      Lorem & Ipsum \tabularnewline
      \hline
      One  &\tabularnewline
      Two  & Wow \tabularnewline
      Three& \tabularnewline
      \hline
    \end{tabular}}
    \qquad
    \begin{tabular}[b]{|c|c|}
      \hline
      Lorem & Ipsum \tabularnewline
      \hline
      One  &\tabularnewline
      Two  & Wow \tabularnewline
      Three& \tabularnewline
      \hline
    \end{tabular}
\end{enumerate}

\end{document}