When I typeset some tabular or array in the following way :
begin{tabular}{c}
a \\
ab \\
abc \\
\end{tabular}
the width of the column adjusts to the maximum cell width. For example, assuming all letters a, b, c are 5mm wide, the width of the column will be 15mm (ignoring extra \tabcolsep).
I guess the tabular environment keeps the max width encountered until then. For example,
- when treating the first cell,
max_widthwould be 0 - when treating the second cell,
max_widthwould be 5mm (width of the first cell) - when treating the third cell,
max_widthwould be 10mm - at the end,
max_widthwould be 15mm, the actual width
Is there a way to get this max_width at some point in the tabular so that I can do stuff with it ?
begin{tabular}{c}
a \\
ab \\
abc \\
\doSomethingWithMaxWidth \\
\end{tabular}
\begin{tabular}{l|r} \multicolumn{2}{c}{c} \ & \ a & b \end{tabular}`
– leandriis Jul 13 '20 at 10:19\hphantom). The 2nd is interesting but the c is not centered. I'm thinking about it, thanks ! – Fred Jul 13 '20 at 10:38