0

I want to make a table where the left column is aligned to top, using array and tabular*. The thing is, when I put [t], it simply ignores it. How can I align the first column to top?

Code:

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{geometry}
\usepackage{array}
\usepackage{calc}

\begin{document}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{center}
    \setlength\tabcolsep{1ex}
    \setlength{\extrarowheight}{0pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r L{\textwidth * \real{0.9}}}
      \textbf{Ejemplo} & Hola1.1 \newline Hola1.2 \\
      \textbf{Ejemplo2} & Hola2
    \end{tabular*}
\end{center}

\end{document}

Output: enter image description here

  • Using p{#1} instead of m{#1} should do. – egreg May 27 '18 at 12:17

Your Answer

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

Browse other questions tagged or ask your own question.