ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \bTABLE[distance=...]
@ 2006-06-28 20:16 Peter Münster
  2006-06-29  8:09 ` \bTABLE[distance=...] Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Münster @ 2006-06-28 20:16 UTC (permalink / raw)


Hello,

when using \bTABLE[distance=...], the table gets wider than the textwidth.
Example:

\starttext
\input tufte

\bTABLE
\bTR\bTD bla bla bla bla\eTD\bTD
\input tufte
\eTD\eTR
\eTABLE

\bTABLE[distance=3em]
\bTR\bTD bla bla bla bla\eTD\bTD
\input tufte
\eTD\eTR
\eTABLE

\input tufte
\stoptext

A workaround seems to be textwidth=\dimexpr\textwidth-3em\relax
Could this be done automatically?

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

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

* Re: \bTABLE[distance=...]
  2006-06-28 20:16 \bTABLE[distance=...] Peter Münster
@ 2006-06-29  8:09 ` Taco Hoekwater
  2006-06-29 12:16   ` \bTABLE[distance=...] Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2006-06-29  8:09 UTC (permalink / raw)




Peter Münster wrote:
> Hello,
> 
> when using \bTABLE[distance=...], the table gets wider than the textwidth.

> 
> A workaround seems to be textwidth=\dimexpr\textwidth-3em\relax
> Could this be done automatically?

I expect it can (and should) be. Stuff sticking out in the margin
is always bad ;-)

Taco

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

* Re: \bTABLE[distance=...]
  2006-06-29  8:09 ` \bTABLE[distance=...] Taco Hoekwater
@ 2006-06-29 12:16   ` Hans Hagen
  2006-06-29 12:39     ` \bTABLE[distance=...] Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2006-06-29 12:16 UTC (permalink / raw)


Taco Hoekwater wrote:
> Peter M�nster wrote:
>   
>> Hello,
>>
>> when using \bTABLE[distance=...], the table gets wider than the textwidth.
>>     
>
>   
>> A workaround seems to be textwidth=\dimexpr\textwidth-3em\relax
>> Could this be done automatically?
>>     
>
> I expect it can (and should) be. Stuff sticking out in the margin
> is always bad ;-)
>   
% test: \advance\!!dimena-\gettbldis\recurselevel\relax

you can enable that line in core-ntb and see what happens

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: \bTABLE[distance=...]
  2006-06-29 12:16   ` \bTABLE[distance=...] Hans Hagen
@ 2006-06-29 12:39     ` Taco Hoekwater
  2006-06-29 17:49       ` \bTABLE[distance=...] Peter Münster
  0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2006-06-29 12:39 UTC (permalink / raw)




Hans Hagen wrote:
>>>Could this be done automatically?
>>
>>I expect it can (and should) be. Stuff sticking out in the margin
>>is always bad ;-)
>>  
> % test: \advance\!!dimena-\gettbldis\recurselevel\relax
> 
> you can enable that line in core-ntb and see what happens

works for me ... Peter?

Taco

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

* Re: \bTABLE[distance=...]
  2006-06-29 12:39     ` \bTABLE[distance=...] Taco Hoekwater
@ 2006-06-29 17:49       ` Peter Münster
  2006-06-29 18:11         ` \bTABLE[distance=...] Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Münster @ 2006-06-29 17:49 UTC (permalink / raw)


On Thu, 29 Jun 2006, Taco Hoekwater wrote:

> > % test: \advance\!!dimena-\gettbldis\recurselevel\relax
> > 
> > you can enable that line in core-ntb and see what happens
> 
> works for me ... Peter?

Yes, thanks! But the next issues follow immediately:
just consider leftmargindistance= and rightmargindistance= at the place of
distance=.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

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

* Re: \bTABLE[distance=...]
  2006-06-29 17:49       ` \bTABLE[distance=...] Peter Münster
@ 2006-06-29 18:11         ` Hans Hagen
  2006-06-29 19:01           ` \bTABLE[distance=...] Peter Münster
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2006-06-29 18:11 UTC (permalink / raw)


� wrote:
> On Thu, 29 Jun 2006, Taco Hoekwater wrote:
>
>   
>>> % test: \advance\!!dimena-\gettbldis\recurselevel\relax
>>>
>>> you can enable that line in core-ntb and see what happens
>>>       
>> works for me ... Peter?
>>     
>
> Yes, thanks! But the next issues follow immediately:
> just consider leftmargindistance= and rightmargindistance= at the place of
> distance=.
>   
well, i let you consider and test the following -)

\def\dochecktblwidths#1%
  {\iftraceTABLE\showtblwids{B#1}\fi
   \!!dimena\hsize
   \!!counta\zerocount
% test, dunno yet
\advance\!!dimena-\tbltblleftmargindistance
\advance\!!dimena-\tbltblrightmargindistance
\advance\!!dimena-\tbltblcolumndistance
   \dorecurse\maximumcol
     {\scratchdimen\gettblaut\recurselevel\relax
% test, seems to work ok
\advance\!!dimena-\gettbldis\recurselevel\relax

etc etc 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: \bTABLE[distance=...]
  2006-06-29 18:11         ` \bTABLE[distance=...] Hans Hagen
@ 2006-06-29 19:01           ` Peter Münster
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Münster @ 2006-06-29 19:01 UTC (permalink / raw)


On Thu, 29 Jun 2006, Hans Hagen wrote:

> well, i let you consider and test the following -)
> 
> \def\dochecktblwidths#1%
>   {\iftraceTABLE\showtblwids{B#1}\fi
>    \!!dimena\hsize
>    \!!counta\zerocount
> % test, dunno yet
> \advance\!!dimena-\tbltblleftmargindistance
> \advance\!!dimena-\tbltblrightmargindistance
> \advance\!!dimena-\tbltblcolumndistance
>    \dorecurse\maximumcol
>      {\scratchdimen\gettblaut\recurselevel\relax
> % test, seems to work ok
> \advance\!!dimena-\gettbldis\recurselevel\relax

Thanks! All combinations of leftmargindistance, rightmargindistance and
distance seems to give the expected results.

What is the difference between distance and columndistance?
I thought the one was just a synonym for the other, but now I see, that you
treat them differently. And indeed, the result is different:

\starttext
\input tufte

\bTABLE[leftmargindistance=1em,rightmargindistance=1em,columndistance=2em]
\bTR\bTD bla bla bla bla\eTD\bTD bla bla bla bla\eTD\bTD
bla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
\eTD\eTR
\eTABLE

\bTABLE[leftmargindistance=1em,rightmargindistance=1em,distance=2em]
\bTR\bTD bla bla bla bla\eTD\bTD bla bla bla bla\eTD\bTD
bla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
\eTD\eTR
\eTABLE

\input tufte
\stoptext

If I change the line
\advance\!!dimena-\tbltblcolumndistance
to
\dorecurse{\numexpr\maximumcol-1\relax}{%
  \advance\!!dimena-\tbltblcolumndistance}%
it seems to work better...

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

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

end of thread, other threads:[~2006-06-29 19:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28 20:16 \bTABLE[distance=...] Peter Münster
2006-06-29  8:09 ` \bTABLE[distance=...] Taco Hoekwater
2006-06-29 12:16   ` \bTABLE[distance=...] Hans Hagen
2006-06-29 12:39     ` \bTABLE[distance=...] Taco Hoekwater
2006-06-29 17:49       ` \bTABLE[distance=...] Peter Münster
2006-06-29 18:11         ` \bTABLE[distance=...] Hans Hagen
2006-06-29 19:01           ` \bTABLE[distance=...] Peter Münster

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).