ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* fun with frames and tables
@ 2020-04-13 12:07 Henning Hraban Ramm
  2020-04-13 13:37 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm @ 2020-04-13 12:07 UTC (permalink / raw)
  To: ntg-context

Hi, 

after I re-setup my computer (harddisk got tired...) I’m now trying to update my old Midgard RPG character sheet (https://github.com/fiee/ConTeXt/tree/master/midgard) and run into some problems that I don’t understand while trying to fill one page with several tables.

Here’s a quite minimal example:


\setupTABLE[c][each][width=2cm]

\starttext

\framed[offset=overlay,width=\textwidth]{%
\vbox{\bTABLE
\dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR}
\eTABLE}%
\hskip1cm%
\vbox{\bTABLE
\dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR}
\eTABLE}%
}

\stoptext


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.

Happy Easter & best regards,
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fun with frames and tables
  2020-04-13 12:07 fun with frames and tables Henning Hraban Ramm
@ 2020-04-13 13:37 ` Wolfgang Schuster
  2020-04-13 14:07   ` Henning Hraban Ramm
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2020-04-13 13:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 13.04.2020 um 14:07:
> Hi,
> 
> after I re-setup my computer (harddisk got tired...) I’m now trying to update my old Midgard RPG character sheet (https://github.com/fiee/ConTeXt/tree/master/midgard) and run into some problems that I don’t understand while trying to fill one page with several tables.
> 
> Here’s a quite minimal example:
> 
> 
> \setupTABLE[c][each][width=2cm]
> 
> \starttext
> 
> \framed[offset=overlay,width=\textwidth]{%
> \vbox{\bTABLE
> \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR}
> \eTABLE}%
> \hskip1cm%
> \vbox{\bTABLE
> \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR}
> \eTABLE}%
> }
> 
> \stoptext
> 
> 
> 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?

\setuppapersize[A4][A3,landscape]

\setuplayout[location=middle]

\showframe

\starttext

\startframed[offset=overlay,width=max]
     \ruledvbox\bgroup
         \bTABLE[width=2cm]
             \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR}
         \eTABLE
     \egroup
     \hskip1cm
     \ruledvbox\bgroup
         \bTABLE[width=2cm]
             \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR}
         \eTABLE
     \egroup
\stopframed

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fun with frames and tables
  2020-04-13 13:37 ` Wolfgang Schuster
@ 2020-04-13 14:07   ` Henning Hraban Ramm
  2020-04-13 16:23     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm @ 2020-04-13 14:07 UTC (permalink / raw)
  To: ntg-context


> Am 13.04.2020 um 15:37 schrieb Wolfgang Schuster <wolfgang.schuster.lists@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?

(I knew that it was shifted to the left, because in my actual project I tried several things.)

Best, Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fun with frames and tables
  2020-04-13 14:07   ` Henning Hraban Ramm
@ 2020-04-13 16:23     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2020-04-13 16:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 13.04.2020 um 16:07:
> 
>> Am 13.04.2020 um 15:37 schrieb Wolfgang Schuster <wolfgang.schuster.lists@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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-13 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 12:07 fun with frames and tables Henning Hraban Ramm
2020-04-13 13:37 ` Wolfgang Schuster
2020-04-13 14:07   ` Henning Hraban Ramm
2020-04-13 16:23     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).