ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* wrong heights in TABLE
@ 2010-03-09 19:08 Peter Münster
  2010-03-09 21:00 ` Peter Münster
  2010-03-10  8:08 ` Taco Hoekwater
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Münster @ 2010-03-09 19:08 UTC (permalink / raw)
  To: ConTeXt list

Hello,

I don't know, what I'm doing wrong here. The number of rows in each column
is only correct, when adding a seventh column:

\startbuffer
\setupTABLE[r][2,3,4,5,6,7][height=6ex]
\bTABLE[width=0.125\textwidth]
\bTR
\bTH 1. col\eTH
\bTH 2. col\eTH
\bTH 3. col\eTH
\bTH 4. col\eTH
\bTH 5. col\eTH
\bTH 6. col\eTH
\doifmode{seven}{\bTH 7. col\eTH}
\eTR
\bTR
\bTD[nr=6]6 rows in 1. col\eTD
\bTD[nr=2]2 rows in 2. col\eTD
\bTD[nr=6]6 rows in 3. col\eTD
\bTD[nr=2]2 rows in 4. col\eTD
\bTD 1 row in 5. col\eTD
\bTD[nr=2]2 rows in 6. col\eTD
\doifmode{seven}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2] 2 rows in 5. col\eTD
\doifmode{seven}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2]2 rows in 2. col\eTD
\bTD[nr=2]2 rows in 4. col\eTD
\bTD[nr=4]4 rows in 6. col\eTD
\doifmode{seven}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2] 2 rows in 5. col\eTD
\doifmode{seven}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2]2 rows in 2. col\eTD
\bTD[nr=2]2 rows in 4. col\eTD
\doifmode{seven}{\bTD\eTD}
\eTR
\bTR
\bTD 1 row in 5. col\eTD
\doifmode{seven}{\bTD\eTD}
\eTR
\eTABLE
\stopbuffer
\starttext
\getbuffer\blank
\enablemode[seven]
\getbuffer
\stoptext

Where could be the problem?

TIA for any hint!
Cheers, Peter

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


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-09 19:08 wrong heights in TABLE Peter Münster
@ 2010-03-09 21:00 ` Peter Münster
  2010-03-10  8:05   ` Taco Hoekwater
  2010-03-10  8:08 ` Taco Hoekwater
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Münster @ 2010-03-09 21:00 UTC (permalink / raw)
  To: ConTeXt list

Hello,

Here a better minimal example-test-file:

\startbuffer
\setupTABLE[c][1,2,3][height=4ex]
\bTABLE[width=0.2\textwidth]
\bTR
\bTH 1. col\eTH
\bTH 2. col\eTH
\doifmode{wa2}{\bTH 3. col\eTH}
\eTR
\bTR
\bTD 1 row in 1. col\eTD
\bTD[nr=2] 2 rows in 2. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2] 2 rows in 1. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\doifmodeelse{wa1}{\bTD[nr=2] 2 rows in 2. col\eTD}{%
  \bTD[nr=4] 4 rows in 2. col\eTD}
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2] 2 rows in 1. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\doifmode{wa1}{\bTD[nr=2] 2 rows in 2. col\eTD}
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\bTD 1 row in 1. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\eTABLE
\stopbuffer
\starttext
Problem:\blank
\getbuffer\blank
Workaround 1:\blank
\enablemode[wa1]
\getbuffer\blank
Workaround 2:\blank
\disablemode[wa1]
\enablemode[wa2]
\getbuffer
\stoptext

TIA for any hint!
Cheers, Peter

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


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-09 21:00 ` Peter Münster
@ 2010-03-10  8:05   ` Taco Hoekwater
  2010-03-10  8:32     ` Peter Münster
  2010-03-10  8:57     ` Hans Hagen
  0 siblings, 2 replies; 10+ messages in thread
From: Taco Hoekwater @ 2010-03-10  8:05 UTC (permalink / raw)
  To: ConTeXt list

Peter Münster wrote:
> 
> TIA for any hint!
> Cheers, Peter

This second example is a broken table specifier when no modes
are enabled: it produces and empty row, which is a no-no.

Best wishes,
Taco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-09 19:08 wrong heights in TABLE Peter Münster
  2010-03-09 21:00 ` Peter Münster
@ 2010-03-10  8:08 ` Taco Hoekwater
  2010-03-10  8:58   ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2010-03-10  8:08 UTC (permalink / raw)
  To: ConTeXt list

Peter Münster wrote:
> 
> Where could be the problem?

My guess is: when you have a row that somehow consists only of
cells with multiple rowspan specifiers, the height of that row is
miscalculated.

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-10  8:05   ` Taco Hoekwater
@ 2010-03-10  8:32     ` Peter Münster
  2010-03-10 17:54       ` Hans Hagen
  2010-03-10  8:57     ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Münster @ 2010-03-10  8:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Mar 10 2010, Taco Hoekwater wrote:

> This second example is a broken table specifier when no modes
> are enabled: it produces and empty row, which is a no-no.

Ok, here an even better and smaller example-test-file:

\starttext
Problem:\blank
\bTABLE
\bTR \bTH 1. col                \eTH \bTH 2. col                 \eTH  \eTR
\bTR \bTD 1 row in 1. col       \eTD \bTD[nr=2] 2 rows in 2. col \eTD  \eTR
\bTR \bTD[nr=2] 2 rows in 1. col\eTD                                   \eTR
\bTR                                 \bTD[nr=3] 3 rows in 2. col \eTD  \eTR
\bTR \bTD 1 row in 1. col       \eTD                                   \eTR
\bTR \bTD 1 row in 1. col       \eTD                                   \eTR
\eTABLE
\stoptext

Cheers, Peter

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


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-10  8:05   ` Taco Hoekwater
  2010-03-10  8:32     ` Peter Münster
@ 2010-03-10  8:57     ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2010-03-10  8:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

On 10-3-2010 9:05, Taco Hoekwater wrote:
> Peter Münster wrote:
>>
>> TIA for any hint!
>> Cheers, Peter
>
> This second example is a broken table specifier when no modes
> are enabled: it produces and empty row, which is a no-no.

indeed, i played with catching it but it's too much work so that has to 
wait till i reimplement this mechanism for mkiv

Hans


-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-10  8:08 ` Taco Hoekwater
@ 2010-03-10  8:58   ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2010-03-10  8:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

On 10-3-2010 9:08, Taco Hoekwater wrote:
> Peter Münster wrote:
>>
>> Where could be the problem?
>
> My guess is: when you have a row that somehow consists only of
> cells with multiple rowspan specifiers, the height of that row is
> miscalculated.

that's indeed the case and finding a solutions is non trivial as it can 
break other things; i'm playing with it but don't have that much time now

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-10  8:32     ` Peter Münster
@ 2010-03-10 17:54       ` Hans Hagen
  2010-03-11  9:31         ` Peter Münster
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2010-03-10 17:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10-3-2010 9:32, Peter Münster wrote:
> On Wed, Mar 10 2010, Taco Hoekwater wrote:
>
>> This second example is a broken table specifier when no modes
>> are enabled: it produces and empty row, which is a no-no.
>
> Ok, here an even better and smaller example-test-file:
>
> \starttext
> Problem:\blank
> \bTABLE
> \bTR \bTH 1. col                \eTH \bTH 2. col                 \eTH  \eTR
> \bTR \bTD 1 row in 1. col       \eTD \bTD[nr=2] 2 rows in 2. col \eTD  \eTR
> \bTR \bTD[nr=2] 2 rows in 1. col\eTD                                   \eTR
> \bTR                                 \bTD[nr=3] 3 rows in 2. col \eTD  \eTR
> \bTR \bTD 1 row in 1. col       \eTD                                   \eTR
> \bTR \bTD 1 row in 1. col       \eTD                                   \eTR
> \eTABLE
> \stoptext

actually it's a feature ... took me a while to figure out that there is 
a check that takes care of it

so, i will not change the code but provide a flag (to be used at your 
own risk)

test:

\starttext

\startbuffer
\bTABLE
\bTR[height=20pt] \bTH 1. col                \eTH \bTH 2. col 
       \eTH  \eTR
\bTR[height=20pt] \bTD 1 row in 1. col       \eTD \bTD[nr=2] 2 rows in 
2. col \eTD  \eTR
\bTR[height=20pt] \bTD[nr=2] 2 rows in 1. col\eTD 
             \eTR
\bTR[height=20pt]                                 \bTD[nr=3] 3 rows in 
2. col \eTD  \eTR
\bTR[height=20pt] \bTD 1 row in 1. col       \eTD 
             \eTR
\bTR[height=20pt] \bTD 1 row in 1. col       \eTD 
             \eTR
\eTABLE

\bTABLE
\bTR[height=20pt] \bTH 2. col                 \eTH  \bTH 1. col 
        \eTH \eTR
\bTR[height=20pt] \bTD[nr=2] 2 rows in 2. col \eTD  \bTD 1 row in 1. col 
       \eTD \eTR
\bTR[height=20pt]                                   \bTD[nr=2] 2 rows in 
1. col\eTD \eTR
\bTR[height=20pt] \bTD[nr=3] 3 rows in 2. col \eTD 
             \eTR
\bTR[height=20pt]                                   \bTD 1 row in 1. col 
       \eTD \eTR
\bTR[height=20pt]                                   \bTD 1 row in 1. col 
       \eTD \eTR
\eTABLE
\stopbuffer

\start
     \getbuffer
     \tightTBLrowspanfalse
     \getbuffer
\stop

\stoptext

will be in next beta

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-10 17:54       ` Hans Hagen
@ 2010-03-11  9:31         ` Peter Münster
  2010-03-11 10:30           ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Münster @ 2010-03-11  9:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Mar 10 2010, Hans Hagen wrote:

>> \starttext
>> Problem:\blank
>> \bTABLE
>> \bTR \bTH 1. col                \eTH \bTH 2. col                 \eTH  \eTR
>> \bTR \bTD 1 row in 1. col       \eTD \bTD[nr=2] 2 rows in 2. col \eTD  \eTR
>> \bTR \bTD[nr=2] 2 rows in 1. col\eTD                                   \eTR
>> \bTR                                 \bTD[nr=3] 3 rows in 2. col \eTD  \eTR
>> \bTR \bTD 1 row in 1. col       \eTD                                   \eTR
>> \bTR \bTD 1 row in 1. col       \eTD                                   \eTR
>> \eTABLE
>> \stoptext
>
> actually it's a feature ... took me a while to figure out that there is a 
> check that takes care of it

Hello Hans,

Could you explain please, why this feature is useful, where the user
supplied row-spans are not honored?

Cheers, Peter

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


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: wrong heights in TABLE
  2010-03-11  9:31         ` Peter Münster
@ 2010-03-11 10:30           ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2010-03-11 10:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11-3-2010 10:31, Peter Münster wrote:
> On Wed, Mar 10 2010, Hans Hagen wrote:
>
>>> \starttext
>>> Problem:\blank
>>> \bTABLE
>>> \bTR \bTH 1. col                \eTH \bTH 2. col                 \eTH  \eTR
>>> \bTR \bTD 1 row in 1. col       \eTD \bTD[nr=2] 2 rows in 2. col \eTD  \eTR
>>> \bTR \bTD[nr=2] 2 rows in 1. col\eTD                                   \eTR
>>> \bTR                                 \bTD[nr=3] 3 rows in 2. col \eTD  \eTR
>>> \bTR \bTD 1 row in 1. col       \eTD                                   \eTR
>>> \bTR \bTD 1 row in 1. col       \eTD                                   \eTR
>>> \eTABLE
>>> \stoptext
>>
>> actually it's a feature ... took me a while to figure out that there is a
>> check that takes care of it
>
> Hello Hans,
>
> Could you explain please, why this feature is useful, where the user
> supplied row-spans are not honored?

no, but i'm pretty sure that the check is there for a reason (maybe to 
catch inconsistencies or so)

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-03-11 10:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-09 19:08 wrong heights in TABLE Peter Münster
2010-03-09 21:00 ` Peter Münster
2010-03-10  8:05   ` Taco Hoekwater
2010-03-10  8:32     ` Peter Münster
2010-03-10 17:54       ` Hans Hagen
2010-03-11  9:31         ` Peter Münster
2010-03-11 10:30           ` Hans Hagen
2010-03-10  8:57     ` Hans Hagen
2010-03-10  8:08 ` Taco Hoekwater
2010-03-10  8:58   ` 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).