0

I have a tabular, in which the first cell is a 2-column 2-row cell. In this cell, there is some \huge text which I want to be top-aligned in the space that this 2-column-2-row-cell now spans. Here is a simple example:

\begin{tabular}{c|p{3cm}|c|l}
    \hline
    \multicolumn{2}{l}{\multirow[t]{2}{*}{{\huge Large Text}}} & X & Foo \\
    \hline
    \multicolumn{2}{l}{}  & Y & Bar \\[1ex]
    \hline
    X & Baz  &  Z & Fuzz 
\end{tabular}

This produces this result:

Output of the above LaTeX example

Note that I inserted all the horizontal and vertical lines just to show where the column / row borders are. The multirow documentation claims that the [t] I specified should cause top-alignment, but obviously something is broken. I would like "Large Text" to be top-aligned with "X Foo".

Note also that I need "X"/"Y"/"Z" and "Foo"/"Bar"/"Fuzz" to be aligned, so I can't just makecell everything right of "Large Text" into a single cell.

There are a million questions related to the combination of multirow and multicolumn here, but I could not find one that experienced the same too-high-alignment problem as I. If I missed some I'm sorry, please point me in the right direction!

0

The [t] option aligns the baselines, but there's a possible trick: \multirow accepts a number of rows with a decimal part (to be determined by trial and error), so if I've well understood, this code does what you want:

\documentclass{article}
\usepackage{array, multirow}
\begin{document}

\begin{table}

\begin{tabular}{c|p{3cm}|c|l}
    \hline
    \multicolumn{2}{l}{\multirow{1.8}{*}{{\huge Large Text}}} & X & Foo \\
    \cline{3-4}
    \multicolumn{2}{l}{} & Y & Bar \\[1ex]
    \hline
    X & Baz & Z & Fuzz
\end{tabular}
    \end{table}

\end{document}

enter image description here

| improve this answer | |

Your Answer

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

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