ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Table question
@ 2004-11-17 13:11 Peter Rolf
  2004-11-17 13:29 ` Thomas A. Schmitz
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Rolf @ 2004-11-17 13:11 UTC (permalink / raw)


Hello Thomas,

Thomas A.Schmitz wrote:

> OK, I'm answering my own question from October: by shamelessly copying 
> and adapting code from enattab, I managed to get double lines in 
> tables, and I'm almost there. I guess real texnicians would call it a 
> dirty hack, but it does what I want. Could anybody test this code:

it works here :)

>
> \starttext
>
> ....
>
> \bTABLE[width=.25\textwidth,frame=off] \bTR \bTD 
> \framed[width=.25\textwidth,height=4.5ex,background=c11,frame=off]{A}

  \bTABLE[width=.25\textwidth, frame=off, offset=overlay] ...
                                                                   ^^^

> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c12,frame=off]{B}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c13,frame=off]{C}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c14,frame=off]{D}
> \eTD \eTR
> \bTR \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{E}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c22,frame=off]{F}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{G}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c24,frame=off]{H}
> \eTD \eTR
> \bTR\bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{I}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c22,frame=off]{K}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{L}
> \eTD \bTD[align=middle] 
> \framed[width=.25\textwidth,height=4.5ex,background=c24,frame=off]{M}
> \eTD \eTR
> \eTABLE
>
> \stoptext
>
> As you can see, the only problem is that there is a small gap between 
> the rows in the table. Is there a way how this gap can be closed?
>
Just add "offset=overlay" to your TABLE setup.
Greetings,

    Peter

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

* Re: Table question
  2004-11-17 13:11 Table question Peter Rolf
@ 2004-11-17 13:29 ` Thomas A. Schmitz
  2004-12-03 14:35   ` Patrick Gundlach
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas A. Schmitz @ 2004-11-17 13:29 UTC (permalink / raw)


Holy cow, this was it! Thanks so much, this works! Wonderful, now I get 
the tables I always wated. Hope this might help other people, too. 
Patrick, would this be of interest for the wiki?

Best, thanks so much

Thomas

On Nov 17, 2004, at 2:11 PM, Peter Rolf wrote:

> Hello Thomas,
>
> it works here :)
>
> Just add "offset=overlay" to your TABLE setup.
> Greetings,
>
>    Peter
>

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

* Re: Table question
  2004-11-17 13:29 ` Thomas A. Schmitz
@ 2004-12-03 14:35   ` Patrick Gundlach
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick Gundlach @ 2004-12-03 14:35 UTC (permalink / raw)


"Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de> writes:

> Holy cow, this was it! Thanks so much, this works! Wonderful, now I
> get the tables I always wated. Hope this might help other people, too.
> Patrick, would this be of interest for the wiki?

Hi,

I don't know if this is in the manuals, or not. If it is (and you just
missed it), then I see no point in duplicating the documentation
(now). If it isn't and you find a place where it fits, go ahead! This
is just my opinion, but the wiki is open to anybodys opionion out
there.

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

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

* Re: Table question
  2004-10-06  8:22 Thomas A.Schmitz
@ 2004-11-15 21:01 ` Thomas A.Schmitz
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas A.Schmitz @ 2004-11-15 21:01 UTC (permalink / raw)


OK, I'm answering my own question from October: by shamelessly copying 
and adapting code from enattab, I managed to get double lines in 
tables, and I'm almost there. I guess real texnicians would call it a 
dirty hack, but it does what I want. Could anybody test this code:

\starttext

\startuniqueMPgraphic{c11}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
path q ;
q = llcorner p--ulcorner p ;
pair a ;
a := point .08 of q ;
path r ;
r = lrcorner p--urcorner p ;
pair b ;
b := point .08 of r ;
draw b--a--ulcorner p--urcorner p ;
draw lrcorner p--llcorner p--a ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{c12}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
path q ;
q = ulcorner p--urcorner p ;
pair a ;
a := point .02 of q ;
path r ;
r = llcorner p--lrcorner p ;
pair b ;
b := point .02 of r ;
path s ;
s = lrcorner p--urcorner p ;
pair c ;
c := point .08 of s ;
path t ;
t = b--a ;
pair d ;
d := point .08 of t ;
path u ;
u = llcorner p--ulcorner p ;
pair e ;
e := point .08 of u ;
draw ulcorner p--urcorner p--c--d--a ;
draw b--lrcorner p ;
draw e--ulcorner p ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{c13}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
path q ;
q = llcorner p--ulcorner p ;
pair a ;
a := point .08 of q ;
path r ;
r = lrcorner p--urcorner p ;
pair b ;
b := point .08 of r ;
draw ulcorner p--urcorner p--b--a ;
draw llcorner p--lrcorner p ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{c14}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
path q ;
q = llcorner p--ulcorner p ;
pair a ;
a := point .08 of q ;
path r ;
r = lrcorner p--urcorner p ;
pair b ;
b := point .08 of r ;
draw ulcorner p--urcorner p--lrcorner p--llcorner p ;
draw b--a ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{c21}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw ulcorner p--llcorner p--lrcorner p ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{c22}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
path q ;
q = ulcorner p--urcorner p ;
pair a ;
a := point .02 of q ;
path r ;
r = llcorner p--lrcorner p ;
pair b ;
b := point .02 of r ;
draw a--b--lrcorner p ;
draw llcorner p--ulcorner p ;
\stopuniqueMPgraphic

\startuniqueMPgraphic{c24}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw ulcorner p--llcorner p--lrcorner p--urcorner p ;
\stopuniqueMPgraphic


\defineoverlay[c11][\uniqueMPgraphic{c11}]
\defineoverlay[c12][\uniqueMPgraphic{c12}]
\defineoverlay[c13][\uniqueMPgraphic{c13}]
\defineoverlay[c14][\uniqueMPgraphic{c14}]
\defineoverlay[c21][\uniqueMPgraphic{c21}]
\defineoverlay[c22][\uniqueMPgraphic{c22}]
\defineoverlay[c24][\uniqueMPgraphic{c24}]

\bTABLE[width=.25\textwidth,frame=off] \bTR \bTD 
\framed[width=.25\textwidth,height=4.5ex,background=c11,frame=off]{A}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c12,frame=off]{B}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c13,frame=off]{C}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c14,frame=off]{D}
\eTD \eTR
\bTR \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{E}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c22,frame=off]{F}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{G}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c24,frame=off]{H}
\eTD \eTR
\bTR\bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{I}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c22,frame=off]{K}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c21,frame=off]{L}
\eTD \bTD[align=middle] 
\framed[width=.25\textwidth,height=4.5ex,background=c24,frame=off]{M}
\eTD \eTR
\eTABLE

\stoptext

As you can see, the only problem is that there is a small gap between 
the rows in the table. Is there a way how this gap can be closed?

Thanks for your patience!

Thomas

On Oct 6, 2004, at 10:22 AM, Thomas A.Schmitz wrote:

> Hi all,
>
> quick question: does any of the table environments in ConTeXt (table, 
> tables, TABLE, linetable) provide the possibility to have double lines 
> separate some rows and columns?
>
> A || B | C
> __________
> ----------
> D |  E | F
>
> Thanks a lot!
>
> Thomas
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

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

* Table question
@ 2004-10-06  8:22 Thomas A.Schmitz
  2004-11-15 21:01 ` Thomas A.Schmitz
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas A.Schmitz @ 2004-10-06  8:22 UTC (permalink / raw)


Hi all,

quick question: does any of the table environments in ConTeXt (table, 
tables, TABLE, linetable) provide the possibility to have double lines 
separate some rows and columns?

A || B | C
__________
----------
D |  E | F

Thanks a lot!

Thomas

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

end of thread, other threads:[~2004-12-03 14:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-17 13:11 Table question Peter Rolf
2004-11-17 13:29 ` Thomas A. Schmitz
2004-12-03 14:35   ` Patrick Gundlach
  -- strict thread matches above, loose matches on Subject: below --
2004-10-06  8:22 Thomas A.Schmitz
2004-11-15 21:01 ` Thomas A.Schmitz

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