ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A TABLE bug (?) from the Wiki.
@ 2005-09-04  5:37 Brooks Moses
  2005-09-04 22:10 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Brooks Moses @ 2005-09-04  5:37 UTC (permalink / raw)


The Wiki page on TABLE contains the following example:

----
\setupTABLE[r][each][height=1cm]
\setupTABLE[c][each][width=1cm]
\setupTABLE[r][1][height=0cm,frame=off]
\bTABLE
\bTR \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \eTR
\bTR \bTD[nc=2,nr=2] r1c1 \eTD \bTD r1c3 \eTD \bTD[nr=2] r1c4 \eTD 
\bTD[nr=2,nc=2] r1c5 \eTD \eTR
\bTR \bTD[nr=2] r2c3 \eTD \eTR
\bTR \bTD[nc=2] r3c1 \eTD \bTD[nc=2] r3c4 \eTD \bTD r3c6 \eTD \eTR
\bTR \bTD r4c1 \eTD \bTD[nc=2] r4c2 \eTD \bTD[nr=2] r4c4 \eTD \bTD[nc=2]
      r4c5 \eTD \eTR
\bTR \bTD[nr=2,nc=2] r5c1 \eTD \bTD[nr=2] r5c3 \eTD \bTD[nr=2,nc=2] r5c5
      \eTD \eTR
\bTR \bTD r6c4 \eTD \eTR
\eTABLE
----

This comes with a note: "There is an ugly hack in the code. An empty first 
row with zero height and no borders is added. If the row is omitted, then 
something odd happens to the number of columns."

Is this an actual bug in ConTeXt, or is it a bug in the example?  If the 
latter, what's the fix?

Thanks,
- Brooks

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

* Re: A TABLE bug (?) from the Wiki.
  2005-09-04  5:37 A TABLE bug (?) from the Wiki Brooks Moses
@ 2005-09-04 22:10 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2005-09-04 22:10 UTC (permalink / raw)


Brooks Moses wrote:

> Is this an actual bug in ConTeXt, or is it a bug in the example?  If 
> the latter, what's the fix?

indeed a bug, seems like the combinex nc/nr case is not handled ok 


\setupTABLE[r][each][height=1cm]
\setupTABLE[c][each][width=1cm]

\bTABLE
\bTR \bTD[nc=2] r1c1 \eTD \bTD r1c3 \eTD \bTD[nr=2] r1c4 \eTD \eTR
\bTR                      \bTD r2c3 \eTD                      \eTR
\eTABLE

\bTABLE
\bTR \bTD[nr=2] r1c1 \eTD \bTD r1c3 \eTD \bTD[nr=2] r1c4 \eTD \eTR
\bTR                      \bTD r2c3 \eTD                      \eTR
\eTABLE

\bTABLE
\bTR \bTD[nr=2,nc=2] r1c1 \eTD \bTD r1c3 \eTD \bTD[nr=2] r1c4 \eTD \eTR
\bTR                           \bTD r2c3 \eTD                      \eTR
\eTABLE
 
 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

end of thread, other threads:[~2005-09-04 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-04  5:37 A TABLE bug (?) from the Wiki Brooks Moses
2005-09-04 22:10 ` 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).