1

I would like in the cell below the text "ABC" to be at top and right aligned, the text "BIO" to be center and middle aligned as it is and the text "John Parker" to be bottom and left aligned. Is that possible just having all three texts in a single cell and how can I achieve it, or should I have the cell divided or creating fron the start more cells and merging them. Here is the MWE:

\documentclass[12pt]{article}
\usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry}
\usepackage{tabularray}

\begin{document}
    \begin{tblr}{colspec={Q[2cm,c]Q[3cm,c]Q[3cm,c]},rows={2.5cm,c},vlines,hlines}
        & 1 & 2 \\
        {\footnotesize \bfseries Monday} & {{\scriptsize ABC} \\ {\large \bfseries BIO} \\ {\scriptsize John Parker}}  & \\
        {\footnotesize Tuesday} &  & \\
    \end{tblr}
\end{document}

enter image description here

1 Answer 1

1

You could do something “conventional” (or maybe I should say “legacy”) like:

\documentclass[12pt]{article}
\usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry}
\usepackage{tabularray}

\begin{document}
    \begin{tblr}{colspec={Q[2cm,c]Q[3cm,c]Q[3cm,c]},rows={2.5cm,c},vlines,hlines}
        & 1 & 2 \\
        \footnotesize\bfseries Monday & \raggedright\scriptsize ABC\par\centering\large\textbf{BIO}\par\raggedleft\scriptsize John Parker  & \\
        \footnotesize Tuesday &  & \\
    \end{tblr}
\end{document}

enter image description here

But why not using three rows with the advantage to be able to do the whole configuration in the row and column specification instead of inside the table cell?

2
  • Can we improve the vertical alignment of the text "ABC" to be placed higher , at the top of the cell and the text "John Parker" to be placed at the bottom of the cell?
    – miltos
    Jan 24 at 15:51
  • @miltos You can add \vspace{…} after each \par, e.g. \vspace{4ex} after the first and \vspace{2ex} after the second. But IMHO this would be one more reason to use more table rows.
    – cabohah
    Jan 25 at 7:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .