ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Row spacing in tables
@ 2003-01-09 16:16 mari.voipio
  2003-01-12 12:27 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: mari.voipio @ 2003-01-09 16:16 UTC (permalink / raw)



As the TABLE manual is not very easily available (and may be not even
applicable here), I hope that somebody can answer to my question...

I had to make a floating table. After a good deal of investigation in the
Beginner's Manual and the list archives I've gotten everything else into
place but the row spacing.

My table (shortened version) is built like this:

\setuptables[bodyfont={9pt,ss},distance=small]

\placetable[here,force][table:specs]{Specifications}
\starttable[|l|lw(8cm)|l|]
\HL
\VL \bf Abbrev. \VL \bf Product name \VL \bf Code \VL \SR
\HL
\VL bog. \VL Bogus text for testing \VL -X \VL \SR
\HL
\VL bog. \VL Bogus text for testing \VL -X \VL \FR
\VL bog. \VL Bogus text for testing \VL -X \VL \LR
\HL
\VL bog. \VL Bogus text for testing \VL -X \VL \FR
\VL bog. \VL Bogus text for testing \VL -X \VL \MR
\VL bog. \VL Bogus text for testing \VL -X \VL \LR
\HL
\stoptable


I managed to make the lines come somewhat tighter together by
\setuptables[distance=small]
but they are not close enough. I tried replacing \MR with \NR and other
variants thereof, but that wasn't really a satisfying solution.

So, how do I tell my ConTeXt how small I want "distance=small" to be
(without affecting the text in the document)?

The only document setting that may affect this is
\setupwhitespace[medium]; in connection with this I've tried the commands
\startpacked, \stoppacked and \nowhitespace, \whitespace (probably real
dumb anyway), neither of them worked.


Any help will be appreciated,

Mari Voipio


PS. Any easy way to color/shade a table cell/row?

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

* Re: Row spacing in tables
  2003-01-09 16:16 Row spacing in tables mari.voipio
@ 2003-01-12 12:27 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2003-01-12 12:27 UTC (permalink / raw)


At 06:16 PM 1/9/2003 +0200, you wrote:

>As the TABLE manual is not very easily available (and may be not even
>applicable here), I hope that somebody can answer to my question...

i patched so much in TaBLe that i will probably rewrite it some day

[btw, there is a new table mechanism under construction, meant for multiple 
page tables, which splits tables over spreads (multiple spreads), i.e. one 
can have tables with 1000 rows and 400 columns; repeat header rows and 
leading columns, and alike; typically a mechanism for database output]

>I had to make a floating table. After a good deal of investigation in the
>Beginner's Manual and the list archives I've gotten everything else into
>place but the row spacing.

good, that's the best way to learn -)

>My table (shortened version) is built like this:
>
>\setuptables[bodyfont={9pt,ss},distance=small]
>
>\placetable[here,force][table:specs]{Specifications}
>\starttable[|l|lw(8cm)|l|]
>\HL
>\VL \bf Abbrev. \VL \bf Product name \VL \bf Code \VL \SR
>\HL
>\VL bog. \VL Bogus text for testing \VL -X \VL \SR
>\HL
>\VL bog. \VL Bogus text for testing \VL -X \VL \FR
>\VL bog. \VL Bogus text for testing \VL -X \VL \LR
>\HL
>\VL bog. \VL Bogus text for testing \VL -X \VL \FR
>\VL bog. \VL Bogus text for testing \VL -X \VL \MR
>\VL bog. \VL Bogus text for testing \VL -X \VL \LR
>\HL
>\stoptable

or:

\startbuffer
\starttable[|l|lw(8cm)|l|]
\HL
\VL \bf Abbrev. \VL \bf Product name \VL \bf Code \VL \SR
\HL
\VL \strut bog. \VL Bogus text for testing \VL -X \VL \SR
\HL
\VL bog. \VL Bogus text for testing \VL -X \VL \FR
\VL bog. \VL Bogus text for testing \VL -X \VL \LR
\HL
\VL \strut bog. \VL Bogus text for testing \VL -X \VL \FR
\VL \strut bog. \VL Bogus text for testing \VL -X \VL \MR
\VL \strut bog. \VL Bogus text for testing \VL -X \VL \LR
\HL
\stoptable
\stopbuffer

\placetable[here,force][table:specs]{Specifications}{\getbuffer}

[this way you can also do: \externalfiguru[buffer][type=buffer,width=5cm]} 
and it's more readable]

>I managed to make the lines come somewhat tighter together by
>\setuptables[distance=small]
>but they are not close enough. I tried replacing \MR with \NR and other
>variants thereof, but that wasn't really a satisfying solution.
>
>So, how do I tell my ConTeXt how small I want "distance=small" to be
>(without affecting the text in the document)?

\setuptables[bodyfont={9pt,ss}] \showstruts

\setuptables[distance=none]
\getbuffer
\setuptables[height=0,depth=0]
\getbuffer
\setuptables[height=\strutheightfactor,depth=\strutdepthfactor]
\getbuffer

>PS. Any easy way to color/shade a table cell/row?

with this kind of tables: a way yes, easy, depends; did you try the bTABLE 
mechanism?

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

end of thread, other threads:[~2003-01-12 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-09 16:16 Row spacing in tables mari.voipio
2003-01-12 12:27 ` Hans Hagen

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