Natural tables, rulethickness
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
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
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/
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/
[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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Patrick Gundlach
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-----
participants (4)
-
Berend de Boer
-
Patrick Gundlach
-
Peter Münster
-
Peter Rolf