ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Natural tables, rulethickness
@ 2006-03-04 12:55 Patrick Gundlach
  2006-03-04 15:42 ` Peter Rolf
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Patrick Gundlach @ 2006-03-04 12:55 UTC (permalink / raw)


Hello,

I have a (natural) table and I'd like to have three rules in that
table. The toprule and the bottomrule should be .08em thick, the
midrule 0.05em. What would be a way to achieve that? The example is
incorrect.


\starttext

\setupTABLE[r][each][frame=off]
\setupTABLE[r][first][topframe=on,rulethickness=.08em]
\setupTABLE[r][first][bottomframe=on,rulethickness=.05em]
\setupTABLE[r][last][bottomframe=on,rulethickness=.08em]
\bTABLE
\bTR \bTD Lorem \eTD \bTD ipsum \eTD \bTD dolor sit \eTD \eTR
\bTR \bTD amet \eTD \bTD[nc=2] consectetuer adipiscing elit \eTD  \eTR
\bTR \bTD 1 \eTD \bTD  \eTD \bTD Donec hendrerit tempor tellus. Donec pretium posuere\eTD \eTR
\bTR \bTD 2 \eTD \bTD  \eTD \bTD tellus. Proin quam nisl, tincidunt
et, mattis eget, convallis nec, \unknown \eTD \eTR
\bTR \bTD  \eTD \bTD[nc=2] purus. Cum sociis \eTD \eTR
\bTR \bTD 3 (natoque) \eTD \bTD penatibus \eTD \bTD  \eTD \eTR
\bTR \bTD 5 \eTD \bTD[nc=2] et magnis dis \eTD  \eTR
\bTR \bTD 6 \eTD \bTD parturient \eTD \bTD montes, nascetur ridiculus \eTD \eTR
\bTR \bTD  \eTD \bTD mus \eTD \bTD Nulla posuere. Donec vitae dolor \eTD \eTR
\eTABLE
\stoptext

Patrick
-- 
ConTeXt wiki and more: http://contextgarden.net

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

* Re: Natural tables, rulethickness
  2006-03-04 12:55 Natural tables, rulethickness Patrick Gundlach
@ 2006-03-04 15:42 ` Peter Rolf
  2006-03-04 19:26   ` Peter Münster
  2006-03-04 17:06 ` Peter Münster
  2006-03-04 21:48 ` Patrick Gundlach
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Rolf @ 2006-03-04 15:42 UTC (permalink / raw)


Hi Patrick,

Patrick Gundlach wrote:
> Hello,
> 
> I have a (natural) table and I'd like to have three rules in that
> table. The toprule and the bottomrule should be .08em thick, the
> midrule 0.05em. What would be a way to achieve that? The example is
> incorrect.
> 
> 
> \starttext
> 
> \setupTABLE[r][each][frame=off]
> \setupTABLE[r][first][topframe=on,rulethickness=.08em]
> \setupTABLE[r][first][bottomframe=on,rulethickness=.05em]
> \setupTABLE[r][last][bottomframe=on,rulethickness=.08em]
> \bTABLE

You can't use different frame sizes in the same frame (as in \framed). A
simple solution is

\setupTABLE[r][2][topframe=on,rulethickness=.05em]

instead of using a bottomframe. Or maybe better

\setupTABLE[r][first][topframe=on,rulethickness=.08em,
  after={\hrule width\hsize height.05em}]

You can adjust the vertical spacing by using

\setupTABLE[r][first][topframe=on,rulethickness=.08em,
  after={\hbox{\raise 5pt\hbox{\vrule width\hsize height.05em}}}]

But the second solution maybe has some unwanted sideeffects (page
breaks,..). I've tried to use \hrule in combination with 'before=', but
this does not work here. Hope this helps.

Greetings, Peter

> \bTR \bTD Lorem \eTD \bTD ipsum \eTD \bTD dolor sit \eTD \eTR
> \bTR \bTD amet \eTD \bTD[nc=2] consectetuer adipiscing elit \eTD  \eTR
> \bTR \bTD 1 \eTD \bTD  \eTD \bTD Donec hendrerit tempor tellus. Donec pretium posuere\eTD \eTR
> \bTR \bTD 2 \eTD \bTD  \eTD \bTD tellus. Proin quam nisl, tincidunt
> et, mattis eget, convallis nec, \unknown \eTD \eTR
> \bTR \bTD  \eTD \bTD[nc=2] purus. Cum sociis \eTD \eTR
> \bTR \bTD 3 (natoque) \eTD \bTD penatibus \eTD \bTD  \eTD \eTR
> \bTR \bTD 5 \eTD \bTD[nc=2] et magnis dis \eTD  \eTR
> \bTR \bTD 6 \eTD \bTD parturient \eTD \bTD montes, nascetur ridiculus \eTD \eTR
> \bTR \bTD  \eTD \bTD mus \eTD \bTD Nulla posuere. Donec vitae dolor \eTD \eTR
> \eTABLE
> \stoptext
> 
> Patrick

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

* Re: Natural tables, rulethickness
  2006-03-04 12:55 Natural tables, rulethickness Patrick Gundlach
  2006-03-04 15:42 ` Peter Rolf
@ 2006-03-04 17:06 ` Peter Münster
  2006-03-04 21:48 ` Patrick Gundlach
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Münster @ 2006-03-04 17:06 UTC (permalink / raw)


On Sat, 4 Mar 2006, Patrick Gundlach wrote:

> \setupTABLE[r][first][bottomframe=on,rulethickness=.05em]

Replace this line by
\setupTABLE[r][2][bottomframe=on,rulethickness=.05em,height=0pt,offset=overlay]

> \bTABLE
> \bTR \bTD Lorem \eTD \bTD ipsum \eTD \bTD dolor sit \eTD \eTR

and add here (second row):
\bTR \bTD[nc=3] \eTD \eTR

Cheers, Peter

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

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

* Re: Natural tables, rulethickness
  2006-03-04 15:42 ` Peter Rolf
@ 2006-03-04 19:26   ` Peter Münster
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Münster @ 2006-03-04 19:26 UTC (permalink / raw)


On Sat, 4 Mar 2006, Peter Rolf wrote:

> \setupTABLE[r][2][topframe=on,rulethickness=.05em]

Hello Patrick,
I've just seen Peter Rolf's solution, this is of course the better and
simpler one. The only case, where my empty row can be useful, is, when you
have just 2 rows:
\starttext
\setupTABLE[frame=off,rulethickness=1pt]
\setupTABLE[r][first][topframe=on]
\setupTABLE[r][2][topframe=on,rulethickness=0.3pt,offset=overlay,height=0pt]
\setupTABLE[r][last][bottomframe=on]
\bTABLE
\bTR \bTD bla \eTD \eTR
\bTR \bTD     \eTD \eTR
\bTR \bTD bla \eTD \eTR
\eTABLE
\stoptext

(There are some tables, where I need this...)

Cheers, Peter

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

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

* Re: Natural tables, rulethickness
  2006-03-04 12:55 Natural tables, rulethickness Patrick Gundlach
  2006-03-04 15:42 ` Peter Rolf
  2006-03-04 17:06 ` Peter Münster
@ 2006-03-04 21:48 ` Patrick Gundlach
  2006-03-06  1:01   ` Berend de Boer
  2 siblings, 1 reply; 6+ messages in thread
From: Patrick Gundlach @ 2006-03-04 21:48 UTC (permalink / raw)



[Three rules in a table]

Thanks, Peter and Peter, the following setup produces the output I'd
like to have:

\setupTABLE[r][first][topframe=on,rulethickness=.08em,
  after={\hrule width\hsize height.05em}]
\setupTABLE[r][last][bottomframe=on,rulethickness=.08em]

but I wish (feature request....) something like

\toprule
\bTR .... \eTR 
\midrule
\bTR .... \eTR 
\bTR .... \eTR 
\bTR .... \eTR 
\bottomrule

or together with \setupTABLE.

Patrick

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

* Re: Natural tables, rulethickness
  2006-03-04 21:48 ` Patrick Gundlach
@ 2006-03-06  1:01   ` Berend de Boer
  0 siblings, 0 replies; 6+ messages in thread
From: Berend de Boer @ 2006-03-06  1:01 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick Gundlach <patrick@gundla.ch> writes:

> but I wish (feature request....) something like
>
> \toprule
> \bTR .... \eTR 
> \midrule
> \bTR .... \eTR 
> \bTR .... \eTR 
> \bTR .... \eTR 
> \bottomrule
>
> or together with \setupTABLE.

Something like:

\def\midrule{% assume we're in a bTABLE
  \bTR[rulethickness=0.8pt,height=\rulethickness,bottomframe=on]\eTR}

might work.

Basically the idea is to insert a very small row with only the rule.

- -- 
Live long and prosper,

Berend de Boer
(PGP public key: http://www.pobox.com/~berend/berend-public-key.txt)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFEC4oEIyuuaiRyjTYRAtSsAKDSUM9jwXojPSonpg3gK+9C1BcJAgCgoKsz
8Y7zTK8OsACPDlDYict/VYc=
=rdDU
-----END PGP SIGNATURE-----

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-04 12:55 Natural tables, rulethickness Patrick Gundlach
2006-03-04 15:42 ` Peter Rolf
2006-03-04 19:26   ` Peter Münster
2006-03-04 17:06 ` Peter Münster
2006-03-04 21:48 ` Patrick Gundlach
2006-03-06  1:01   ` Berend de Boer

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