[NTG-context] fun with frames and tables

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Mon Apr 13 18:23:30 CEST 2020


Henning Hraban Ramm schrieb am 13.04.2020 um 16:07:
> 
>> Am 13.04.2020 um 15:37 schrieb Wolfgang Schuster <wolfgang.schuster.lists at gmail.com>:
>>
>> Henning Hraban Ramm schrieb am 13.04.2020 um 14:07:
>>>
>>> I’m trying to get those tables side by side, but the size of the wrapping box is somehow miscalculated – if I set the width, the left table disappeares to the left, if I don’t, the box exceeds the paper width.
>>> Maybe it’s completely unrelated to the tables.
>>> In the full document, there’s also space before or after one of the tables, so that they don’t align.
>>> There are actually not just two tables, but a short wide one and a combination of 3*2 small ones on the left side (that’s why I seem to need that \vbox) and a big table on the right side. But I’ll care about the other problems if I understand what’s going on with those boxes.
>>
>> Can you see where your left table is?
> 
> Yes, thank you – but why?

When you put horizontal material in a \vbox the width of the box uses 
the value of \hsize before you opened it. You can make now a local 
change of \hsize in the box or just use another \framed for the table 
(or put the two smaller tables in a larger one).

\starttext

\startframed[offset=overlay,width=max]
     \startframed[frame=off,strut=no,offset=0pt,width=fit]
         \bTABLE[width=2cm]
             \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR}
         \eTABLE
     \stopframed
     \hskip1cm
     \startframed[frame=off,strut=no,offset=0pt,width=fit]
         \bTABLE[width=2cm]
             \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR}
         \eTABLE
     \stopframed
\stopframed

\stoptext

Wolfgang


More information about the ntg-context mailing list