3

I have two tabulars in a single table environment. They should be aligned but they are not (see photo), despite me having specified all the column widths and given them the exact same setup. Can anyone help with this mystery? Removing the multicolumns in the first table doesn't help. Thank you.

(The contents of the multicolumn cells should also be centered.)

Font changes removed from the MWE.

enter image description here


\usepackage{booktabs}

\newcommand\tss{\textsuperscript}

% ...

\begin{table}[!htbp]
\centering 
    
\begin{tabular}{p{15mm}>{\centering}p{15mm}|>{\centering}p{15mm}|>{\centering}p{15mm}p{1mm}>{\centering}p{15mm}|>{\centering\arraybackslash}p{15mm}}

\cmidrule[.8pt](l{3pt}r{3pt}){2-4} \cmidrule[.8pt](l{3pt}r{3pt}){6-7} 

Pong & a\tss{1} & \multicolumn{2}{p{30mm}}{a\tss{3\,5}} &  & aːt\tss{7} & at\tss{9} \\

\cmidrule(l{3pt}r{3pt}){2-4} \cmidrule(l{3pt}r{3pt}){6-7} 

& a\tss{2} & \multicolumn{2}{p{30mm}}{a\tss{4\,6}} &  & aːt\tss{8} & at\tss{10} \\

\cmidrule[.8pt](l{3pt}r{3pt}){2-4} \cmidrule[.8pt](l{3pt}r{3pt}){6-7}  
     
\end{tabular}
    
\begin{tabular}{p{15mm}>{\centering}p{15mm}|>{\centering}p{15mm}|>{\centering}p{15mm}p{1mm}>{\centering}p{15mm}|>{\centering\arraybackslash}p{15mm}}
     
\cmidrule[.8pt](l{3pt}r{3pt}){2-4} \cmidrule[.8pt](l{3pt}r{3pt}){6-7} 
    
Viet. & a & á & ả &  & át & ắt \\

\cmidrule(l{3pt}r{3pt}){2-4} \cmidrule(l{3pt}r{3pt}){6-7} 

& à & ạ & ã &  & ạt & ặt \\

\cmidrule[.8pt](l{3pt}r{3pt}){2-4} \cmidrule[.8pt](l{3pt}r{3pt}){6-7} 
     
\end{tabular}

\end{table} 

1 Answer 1

6

\multicolumn{2}{p{30mm}} isn't as wide as the two columns p{15mm}|p{15mm}, as between the two columns there is also the space of two \tabcolsep plus, if you loaded array, the space of one \arrayrulewidth. So for your \multicolumn use

  • \multicolumn{2}{p{\dimexpr30mm+2\tabcolsep}}{...} if the array package isn't loaded

  • \multicolumn{2}{p{\dimexpr30mm+2\tabcolsep+\arrayrulewidth}}{...} if array is loaded.

2
  • Many thanks for this. Previously, instead of \multicolumn, I had the top tabular with one column fewer, also specified as p{30mm} ... should I understand that this failed for the same reason?
    – legatrix
    Commented Nov 9, 2020 at 8:11
  • 2
    @legatrix yes, and the solution would be the same.
    – Skillmon
    Commented Nov 9, 2020 at 8:29

You must log in to answer this question.

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