[NTG-context] Bad cooperation between \unit and TABLE

Tomas Hala tomas.hala at mendelu.cz
Mon Nov 4 00:43:12 CET 2019

Hi all,

I came across the problem with bad aligment of cells in natural tables
(longer MWE below):

When I use \unit for better typesetting of units, lines 6, 6a, 8 and 9
are sloppy-aligned -- first, the alignmentcharacter is ignored,
secondly the very huge space appears between e.g. m and 2. It seems 
that it happens at any time when the exponent in any form is required.

Moreover, the line 11 is also sloppy-aligned as a consequence of the
use of \unit|\high commands because if the line 2a is active, the 
alignment position is computed properly and the line 11 is ok.

Is it a bug, or am I doing something wrong?

Best wishes,


\setupTABLE[c][2][alignmentcharacter={text->,}, aligncharacter=yes, align={lohi,middle}]
\bTR\bTD Line \#1 \eTD          \bTD39 \eTD     \eTR
\bTR\bTD Line \#2 \eTD  \bTD 42,185 \eTD        \eTR
%\bTR\bTD Line \#2a \eTD \bTD 55 550,21          \eTD\eTR
\bTR\bTD Line \#3 \eTD  \bTD 41,85\,\% \eTD     \eTR
\bTR\bTD Line \#4 \eTD  \bTD 1125,80 centimeter \eTD\eTR
\bTR\bTD Line \#5\eTD   \bTD 1125,80 \unit{cm}  \eTD\eTR
\bTR\bTD Line \#6 \eTD  \bTD 129,30 \unit{square centimeter} \eTD\eTR
\bTR\bTD Line \#6a \eTD \bTD 129,30 \unit{m2} \eTD\eTR
\bTR\bTD Line \#7 \eTD  \bTD 129,30 \unit{m}    \eTD\eTR
\bTR\bTD Line \#8 \eTD  \bTD 129,30 cm$^{\tfxx2}$\,\eTD\eTR
\bTR\bTD Line \#9 \eTD \bTD 0,21 m\high{2}     \eTD\eTR
\bTR\bTD Line \#10 \eTD \bTD 41,85 \%           \eTD\eTR
\bTR\bTD Line \#11 \eTD \bTD 55 550,21          \eTD\eTR
\bTR\bTD Line \#12 \eTD \bTD 0,21               \eTD\eTR

More information about the ntg-context mailing list