[NTG-context] A bug in character alignment?

Nicolas Grilly nicolas at garden-paris.com
Mon Jul 31 21:34:08 CEST 2006


Hello,

I use ConTeXt natural tables to produce reports, and I use character
alignment to align numbers in these tables.

For example:
\setupTABLE[column][each][align={middle,lohi}, aligncharacter=yes,
alignmentcharacter={.}]

But I have a little issue with character alignment. I have several
tables following each other. First and second tables are well aligned.
But following tables have some columns mis-aligned. You can see the
result in the attached file report_with_bug.pdf (look at column 4 of
tables 3, 4, 5 and 6).

If I comment table 2, then the problem disappears. You can see the
result in the attached file report_without_bug.pdf. If I uncomment
table 2, but move it to end of file, then the problem disappears too.

It seems there is some side effect in code managing character
alignment: perhaps a global variable is not reset each time a new
table starts?

The attached file character_alignment_bug.tex contains the code
producing the first example, where the bug is visible.

I looked through core-ntb.tex and supp-ali.tex but was unable to
understand where is the problem. We have lot of tables like this in
our production, and some are horribles because of this character
alignment issue...

Thanks for your help!

Nicolas Grilly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: report_with_bug.pdf
Type: application/pdf
Size: 67103 bytes
Desc: not available
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20060731/e564b00e/attachment-0002.pdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: report_without_bug.pdf
Type: application/pdf
Size: 67123 bytes
Desc: not available
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20060731/e564b00e/attachment-0003.pdf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: character_alignment_bug.tex
Type: application/x-tex
Size: 19435 bytes
Desc: not available
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20060731/e564b00e/attachment-0001.tex 


More information about the ntg-context mailing list