ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* natural tables and columndistance/spaceinbetween
@ 2015-11-26  1:44 Alan BRASLAU
  2015-11-30 12:23 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Alan BRASLAU @ 2015-11-26  1:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

In natural tables
http://wiki.contextgarden.net/TABLE

the parameters
  columndistance=dimension,
and
  spaceinbetween=dimension,
will set the gaps between columns and rows, respectively.

Is there some way of specifying row gaps for specific rows?
For example, say that I only want a gap after the first row.
I tried:

\bTABLE
  \bTR [spaceinbetween=.25em]
     \bTD 1 \eTD
     \bTD 2 \eTD
  \eTR
  \bTR
     \bTD A \eTD
     \bTD B \eTD
  \eTR
  \bTR
    \bTD a \eTD
    \bTD b \eTD
  \eTR
\eTABLE

Alternately, I tried
\setupTABLE [r][1][spaceinbetween=.25em]

but these do not work.


One might think about trying

  \bTR [bottomframe=on,framecolor=white,rulethickness=.25em]
  ...
  \eTR

but this presents several problems:
1) When using background=color, the background color gives a hairline
overflow beyond the rule, at least using the pdf viewers that I have on
my computer.
2) there appears to be some interference between setting rulethickness
and columndistance, so that spaces between columns disappear when
putting a thick bottomframe. Of course, one could kludge a column
separation using a rightframe, but this is not satisfactory.
3) The use of a white rule when one really wants to leave some space is
not very satisfying.

Does anyone have any suggestions?
Thanks

Alan
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: natural tables and columndistance/spaceinbetween
  2015-11-26  1:44 natural tables and columndistance/spaceinbetween Alan BRASLAU
@ 2015-11-30 12:23 ` Wolfgang Schuster
  2015-12-02 16:25   ` Alan BRASLAU
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2015-11-30 12:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1610 bytes --]

> Alan BRASLAU <mailto:alan.braslau@cea.fr>
> 26. November 2015 um 02:44
> In natural tables
> http://wiki.contextgarden.net/TABLE
>
> the parameters
> columndistance=dimension,
> and
> spaceinbetween=dimension,
> will set the gaps between columns and rows, respectively.
>
> Is there some way of specifying row gaps for specific rows?
> For example, say that I only want a gap after the first row.
> I tried:
>
> \bTABLE
> \bTR [spaceinbetween=.25em]
> \bTD 1 \eTD
> \bTD 2 \eTD
> \eTR
> \bTR
> \bTD A \eTD
> \bTD B \eTD
> \eTR
> \bTR
> \bTD a \eTD
> \bTD b \eTD
> \eTR
> \eTABLE
>
> Alternately, I tried
> \setupTABLE [r][1][spaceinbetween=.25em]
>
> but these do not work.
>
>
> One might think about trying
>
> \bTR [bottomframe=on,framecolor=white,rulethickness=.25em]
> ...
> \eTR
>
> but this presents several problems:
> 1) When using background=color, the background color gives a hairline
> overflow beyond the rule, at least using the pdf viewers that I have on
> my computer.
> 2) there appears to be some interference between setting rulethickness
> and columndistance, so that spaces between columns disappear when
> putting a thick bottomframe. Of course, one could kludge a column
> separation using a rightframe, but this is not satisfactory.
> 3) The use of a white rule when one really wants to leave some space is
> not very satisfying.
>
> Does anyone have any suggestions?
You can use the boffset key to set a different offset value for the 
bottom of the cell.

The correct the position of the frame at the bottom you can use metapost 
to draw
the frame as background graphic.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2794 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: natural tables and columndistance/spaceinbetween
  2015-11-30 12:23 ` Wolfgang Schuster
@ 2015-12-02 16:25   ` Alan BRASLAU
  2015-12-02 16:39     ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Alan BRASLAU @ 2015-12-02 16:25 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On Mon, 30 Nov 2015 13:23:28 +0100
Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> You can use the boffset key to set a different offset value for the
> bottom of the cell.
> 
> The correct the position of the frame at the bottom you can use
> metapost to draw the frame as background graphic.

Thanks Wolfgang.

boffset (or toffset) works to offset the text in an individual cell.
But when using background=color,backgroundcolor=lightgray (for example),
this offset of course gets colored.

I now have tried

\bTABLE
  [option=stretch,
   background=color,
   backgroundcolor=middlegray,
   columndistance=.25em,
   frame=off]
  ...
  \bTR
    [topframe=on,framecolor=white,rulethickness=.25em]
    ...
  \eTR
  ...
\eTABLE

with success.

Note, however, if I move the settings to
  \bTABLE [framecolor=white,rulethickness=.25em,...]
this will then interfere and wipe-out the columndistance=.25em setting!

I can get it to work (with a subtly different result) if I use:
  \bTABLE [rulethickness=.25em,columndistance=.5em]
    ...
    \bTR [topframe=on,framecolor=white]
      ...
    \eTR
    ...
  \eTABLE
and this makes sense (since the calculation of cell widths must take
into account all of rulethickness, offset, and columndistance) but it
is somewhat counter-intuitive.

I'll wiki-fy this...

Alan
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: natural tables and columndistance/spaceinbetween
  2015-12-02 16:25   ` Alan BRASLAU
@ 2015-12-02 16:39     ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2015-12-02 16:39 UTC (permalink / raw)
  To: Alan BRASLAU; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 410 bytes --]

> Alan BRASLAU <mailto:alan.braslau@cea.fr>
> 2. Dezember 2015 um 17:25
> On Mon, 30 Nov 2015 13:23:28 +0100
>
> Thanks Wolfgang.
>
> boffset (or toffset) works to offset the text in an individual cell.
> But when using background=color,backgroundcolor=lightgray (for example),
> this offset of course gets colored.
You can take care of this when you use metapost to draw the frame and 
background.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1478 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2015-12-02 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-26  1:44 natural tables and columndistance/spaceinbetween Alan BRASLAU
2015-11-30 12:23 ` Wolfgang Schuster
2015-12-02 16:25   ` Alan BRASLAU
2015-12-02 16:39     ` 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).