LaTeX forum ⇒ Graphics, Figures & TablesMultirow overflowing neighboring cell

Information and discussion about graphics, figures & tables in LaTeX documents.
mushishi
Posts: 7
Joined: Wed Jun 05, 2019 6:04 pm

Multirow overflowing neighboring cell

Postby mushishi » Thu May 05, 2022 3:58 pm

I am trying to create a table where there some cells have disproportionately more text than others, but don't want to bother with manual formatting. This is my current code:

\begin{table}
    \begin{tabularx}{\textwidth}{X|X|X}
    \centering
    
        Case & Metric & Property \\
        \hline
            Either 1 or 2 only & \multirow{2}{=}{
                attack potential,
                attack time,
                consequence,
                costs,
                detectability,
                difficulty level,
                elapsed time,
                impact,
                insider required,
                mitigation success,
                outcome,
                penalty,
                profit,
                response time,
                resources,
                severity,
                skill level,
                special equipment needed,
                special skill needed,
                survivability
            } & todo3 \\
        \cline{1-1} \cline{3-3}
        Both 1 and 2 &  & todo6 \\
        \hline
        Third party & todo 7 & todo 8
        \end{tabularx}
    \caption{Summary of \ac{AT} metrics.}
    \label{table:metrics}
\end{table}


The problem is that with "=", the rows below are not respected and with "*", the cells to the right of the cell ending with survivability. How can I enforce the cell to keep its borders?

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
Bartman
Posts: 306
Joined: Fri Jan 03, 2020 2:39 pm

Multirow overflowing neighboring cell

Postby Bartman » Thu May 05, 2022 4:36 pm

Please create a Infominimal working example so that we don't have to complete it afterwards.

Why do you actually use the \multirow command in this context? You could leave the arrangement of the cell content to the column type.

Due to the small column width, the default justification should be replaced by a left-justified alignment. The array package loaded by the tabularx package can help you with this.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 6 guests