TeX - LaTeX Asked on August 12, 2021
I am working on a document, in Overleaf, using multirow in the usual fashion to make my tables look less crowded. I would like to vertical (top) align my multirow cells. However, I’m seeing unexpected behaviour.
multirow{2}{*}{textbf{2}}
gives normal behaviour (bold ‘2’ centered vertically)
multirow[t]{2}{*}{textbf{2}}
gives an error: “Missing number treated as zero. Illegal unit of measure (pt inserted).” Followed by Overfull errors, presumably caused the automatic insertion to fix the first and second errors. Compiled I get black boxes in my table with “[t]” printed, although it is top aligned.
I have tried to recreate this error in a new document, but I see only the expected behaviour! I have a lot of other packages in use and formatting on the document (I need to use a proprietary template) – are there any incompatibilities that I should investigate. Is there a common mistake I am making?
Previous (solved) questions have cited possible incompatibility with siunitx: one fixed with extra braces around multirow and one fixed with tablenum. I am using siunitx, but the errors I’m getting are different from those reported previously and the solutions did not work in this case.
Simplified code (Note: this works!! – the same code in my document does not.):
usepackage{multirow}
usepackage{siunitx}
sisetup{
detect-mode,
detect-family,
detect-inline-family=math,
}
usepackage{tabularx}
begin{table*}
begin{tabular*}{textwidth}{@{extracolsep{fill}}llrrrrrr}
hline
A & B & C & D & E & F & G & H
hline
multirow[t]{4}{*}{textbf{1}} & i & 1 & 2 & 1.0 & num{-2} & 0.0 & 6.0
& ii & 1.0 & 103 & 04 & 1 & 0.4 & 10
& iii & 2.5 & 6 & 0.06 & 0.78 & num{-0.8} & 6.2
& iv & 1.3 & 35 & 2 & num{-10} & 0.06 & 1
multirow[t]{2}{*}{textbf{2}}& v & 80 & 1 & 0.44 & 0.80 & 0.22 & 2
& vi & 100 & 12.31 & 0.02 & 0.30 & num{-1.16} & 1
hline
end{tabular*}
end{table*}
This issue was due to the Overleaf project using TeX Live 2016, at which time, the vertical alignment functionality was not present in multirow.
With the project changed to use TL2019, changes had to be made to the template I was using. A similar question (that I didn't see previously) was posted here and @LianTzeLim posted a solution here.
Correct answer by Dave on August 12, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP