I want to enclose a tabular
environment with a bracket, inside an enumerate
environment, and be aligned to top.
In the following example:
\documentclass[a4paper]{article}
\begin{document}
\begin{enumerate}
\item
\(\left.\begin{tabular}{l}
First line\\
Second line\\
Third line
\end{tabular}\right\}\)
Text
\end{enumerate}
\end{document}
I get everything centred, and not aligned to top:
If I ask tabular
to be aligned at top, then still the inline math is not, so the following happens:
\documentclass[a4paper]{article}
\begin{document}
\begin{enumerate}
\item
\(\left.\begin{tabular}[t]{l}
First line\\
Second line\\
Third line
\end{tabular}\right\}\)
Text
\end{enumerate}
\end{document}
Is there any way to tell the inline math to also align to top?
Best Answer
I'd define a new environment and use
adjustbox
for this. The principle is the same as in Heiko's answer.With
varwidth
you're sure your side text will occupy only the necessary width.