Re: [NTG-context] two problems with natural tables

2012-01-18 Thread Hans Hagen

On 18-1-2012 05:19, Brian Landy wrote:

Hi, sorry to dredge up such an old thread, but I recently updated from a Feb 
2010 vintage minimals to current (first to 1/12/2012, then to today 1/17).  I 
ran into problems splitting a table within a splitfloat.  I search the list 
archives and came up with this example, which is failing for me.

\starttext
\placetable[split]{Test}
{\bTABLE[split=yes]
\dorecurse{60}{
\bTR \bTD hello \eTD \eTR
}
\eTABLE}
\stoptext



argument  \c!suffixstopper


In your cont-new.mkiv file, add (after \unprotect)

\def\c!suffixstopper{suffixstopper}

I wonder why it show up now ... either I lost some definition or it 
suddenly started working


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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
___


Re: [NTG-context] two problems with natural tables

2012-01-18 Thread Brian R. Landy
This worked perfectly, thanks!

Brian

On Jan 18, 2012, at 3:47 AM, Hans Hagen pra...@wxs.nl wrote:

 On 18-1-2012 05:19, Brian Landy wrote:
 Hi, sorry to dredge up such an old thread, but I recently updated from a Feb 
 2010 vintage minimals to current (first to 1/12/2012, then to today 1/17).  
 I ran into problems splitting a table within a splitfloat.  I search the 
 list archives and came up with this example, which is failing for me.
 
 \starttext
 \placetable[split]{Test}
 {\bTABLE[split=yes]
 \dorecurse{60}{
 \bTR \bTD hello \eTD \eTR
 }
 \eTABLE}
 \stoptext
 
 argument  \c!suffixstopper
 
 In your cont-new.mkiv file, add (after \unprotect)
 
 \def\c!suffixstopper{suffixstopper}
 
 I wonder why it show up now ... either I lost some definition or it suddenly 
 started working
 
 Hans
 
 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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
 ___
___
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
___


Re: [NTG-context] two problems with natural tables

2012-01-17 Thread Brian Landy
Hi, sorry to dredge up such an old thread, but I recently updated from a Feb 
2010 vintage minimals to current (first to 1/12/2012, then to today 1/17).  I 
ran into problems splitting a table within a splitfloat.  I search the list 
archives and came up with this example, which is failing for me.

\starttext
\placetable[split]{Test}
{\bTABLE[split=yes]
\dorecurse{60}{
\bTR \bTD hello \eTD \eTR
}
\eTABLE}
\stoptext

I get this error:

! Undefined control sequence.

system   tex  error on line 7 in file test.tex: Undefined control 
sequence ...

1 \starttext
2 \placetable[split]{Test}
3 {\bTABLE[split=yes]
4 \dorecurse{60}{
5 \bTR \bTD hello \eTD \eTR
6 }
7   \eTABLE}
8 \stoptext
9 

argument \c!suffixstopper 

\floatcaptionparameter ...\currentfloatcaption :#1
  \endcsname \??floatcaption...
argument ...mber )}\thecurrentfloatnumbersuffix 
  \dostoptagged \dostarttagg...
\flushbothlabelclass #1#2#3-#1#3
 #2
\namedtaggedlabeltexts ...\dostarttagged {#1}{#2}}
  \dostoptagged \endgroup 
\thecurrentfloatnumber ...rrentfloatnumbersuffix }
  \fi \fi \fi 
...
l.7 \eTABLE
   }


Any ideas?

Thanks,
Brian

On Apr 20, 2011, at 3:30 AM, Florian Wobbe wrote:

 
 On Apr 18, 2011, at 21:14 , Hans Hagen wrote:
 
 On 18-4-2011 7:16, Wolfgang Schuster wrote:
 \def\floatcaptionattribute
  {\iflocation \ifnofloatnumber \else \ifnofloatcaption \else 
 \ifinsidesplitfloat \else
 attr \destinationattribute \currentfloatattribute
   \fi \fi \fi \fi}
 
 ok, patched
 
 Wolfgang, Hans, as usual thanks for the support and the quick fix!
 Florian
 
 ___
 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
 ___
 

___
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
___


Re: [NTG-context] two problems with natural tables

2011-04-20 Thread Florian Wobbe

On Apr 18, 2011, at 21:14 , Hans Hagen wrote:

 On 18-4-2011 7:16, Wolfgang Schuster wrote:
 \def\floatcaptionattribute
   {\iflocation \ifnofloatnumber \else \ifnofloatcaption \else 
 \ifinsidesplitfloat \else
  attr \destinationattribute \currentfloatattribute
\fi \fi \fi \fi}
 
 ok, patched

Wolfgang, Hans, as usual thanks for the support and the quick fix!
Florian

___
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
___


Re: [NTG-context] two problems with natural tables

2011-04-18 Thread Wolfgang Schuster

Am 10.04.2011 um 18:40 schrieb Florian Wobbe:

 Hi,
 
 1) I tried the following minimal example from 
 http://archive.contextgarden.net/message/20110109.151431.f774696a.en.html
 
 \placetable[split]{Test}
 {\bTABLE[split=yes]
 \dorecurse{60}{
 \bTR \bTD hello \eTD \eTR
 }
 \eTABLE}
 
 with the current context versions which works fine. However, if I insert the 
 code in a big project with many setups it fails with the attached error 
 message. So there are setups which cause this error. Unfortunately I couldn't 
 figure out what causes the problem.

The error comes from the \floatcaptionattribute and \destinationattribute 
commands. \destinationattribute expects a number as argument (which is stored 
in the \currentfloatattribute macro) but with a split float it gets a empty 
argument.

A split float sets \usesamefloatnumber to true and there \currentfloatattribute 
is \empty.

\long\def\docompletefloat#1#2#3#4#5% #1:floatclass #2:reference #3:optionlist 
#4:caption #5:box number
  {\presetfloatvariables{#1}{#3}{#2}{#5}% check this one
   \bgroup
   % prepare structure data
   %
   % 
\dofloatcomponent[\c!name=#1,\c!reference=#2,\c!bookmark=,\c!title={#4}][]% 
ifnofloatnumber ifnofloatcaption \tracefloatnumber{#1}%
   %
   \ifconditional\usesamefloatnumber
  \globallet\currentfloatnumber \previousfloatnumber
  \globallet\currentfloatattribute  \empty
  \globallet\currentfloatsynchronize\relax
   \else
   …


As simple fix is to check for a split float when the attribute is set:

\setupinteraction[state=start]

% original defintion from strc-flt.mkiv
%
%\def\floatcaptionattribute
%  {\iflocation \ifnofloatnumber \else \ifnofloatcaption \else
% attr \destinationattribute \currentfloatattribute
%   \fi \fi \fi}

% patched definition with check for split float

\def\floatcaptionattribute
  {\iflocation \ifnofloatnumber \else \ifnofloatcaption \else 
\ifinsidesplitfloat \else
 attr \destinationattribute \currentfloatattribute
   \fi \fi \fi \fi}

\starttext
\placetable[split]{Caption}
  {\bTABLE\dorecurse{60}{\bTR\bTD text\eTD\eTR}\eTABLE}
\stoptext


Wolfgang

___
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
___


Re: [NTG-context] two problems with natural tables

2011-04-18 Thread Hans Hagen

On 18-4-2011 7:16, Wolfgang Schuster wrote:

\def\floatcaptionattribute
   {\iflocation \ifnofloatnumber \else \ifnofloatcaption \else 
\ifinsidesplitfloat \else
  attr \destinationattribute \currentfloatattribute
\fi \fi \fi \fi}


ok, patched

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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
___


Re: [NTG-context] two problems with natural tables

2011-04-11 Thread Wolfgang Schuster

Am 10.04.2011 um 18:40 schrieb Florian Wobbe:

 2) How do I get a small and bold header? This does not work:
 
 \bTABLE
 \setupTABLE[style=\tfx]
 \setupTABLE[row][1][style=\bfx] % redundant w/ line 5
 \bTABLEhead
 \bTR[style=\bfx] \bTH Header \eTH \eTR
 \eTABLEhead
 \bTABLEbody
 \bTR \bTD hello \eTD \eTR
 \bTR \bTD world \eTD \eTR
 \eTABLEbody
 \eTABLE

You mix too many setups, \bTH overwrites your setting for the row 
(\bTR[style=\tfx])
and also your other setting (\setupTABLE[row][1][style=\bfx]). Here is one to 
separate
the style and the markup

\startsetups table:style
\setupTABLE[start] [style=\tfx]
\setupTABLE[header][style=\bfx]
\stopsetups

\starttext

\bTABLE[setups=table:style]
\bTABLEhead
\bTR \bTD Header \eTD \eTR
\eTABLEhead
\bTABLEbody
\bTR \bTD Body \eTD \eTR
\eTABLEbody
\eTABLE

\stoptext

Wolfgang

___
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
___


Re: [NTG-context] two problems with natural tables

2011-04-11 Thread Florian Wobbe
 2) How do I get a small and bold header? This does not work:
 
 \bTABLE
 \setupTABLE[style=\tfx]
 \setupTABLE[row][1][style=\bfx] % redundant w/ line 5
 \bTABLEhead
 \bTR[style=\bfx] \bTH Header \eTH \eTR
 \eTABLEhead
 \bTABLEbody
 \bTR \bTD hello \eTD \eTR
 \bTR \bTD world \eTD \eTR
 \eTABLEbody
 \eTABLE
 
 You mix too many setups, \bTH overwrites your setting for the row 
 (\bTR[style=\tfx])
 and also your other setting (\setupTABLE[row][1][style=\bfx]). Here is one to 
 separate
 the style and the markup
 
 \startsetups table:style
   \setupTABLE[start] [style=\tfx]
   \setupTABLE[header][style=\bfx]
 \stopsetups
 
 \starttext
 
 \bTABLE[setups=table:style]
 \bTABLEhead
 \bTR \bTD Header \eTD \eTR
 \eTABLEhead
 \bTABLEbody
 \bTR \bTD Body \eTD \eTR
 \eTABLEbody
 \eTABLE
 
 \stoptext

Thanks Wolfgang,

so to make style=... also work on the header the trick was to change
  \bTH Header \eTH
to
  \bTD Header \eTD.

What is the purpose of \bTH \eTH then? BTW the Wiki says: Please take account 
of the fact, that the head cells are enclosed by \bTH and \eTH (and not 
\[be]TC).

\bTH seems to only override style=... since \bTD Header \eTD is repeated 
correctly with \bTABLE[split=repeat,setups=table:style].

Florian

___
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
___


Re: [NTG-context] two problems with natural tables

2011-04-11 Thread Florian Wobbe
 1) I tried the following minimal example from 
 http://archive.contextgarden.net/message/20110109.151431.f774696a.en.html
 
 \placetable[split]{Test}
 {\bTABLE[split=yes]
 \dorecurse{60}{
 \bTR \bTD hello \eTD \eTR
 }
 \eTABLE}
 
 with the current context versions which works fine.

I have to correct myself. This still does not work with interactions 
(\setupinteraction [state=start]).

 I could determine the context version at which my big document fails: 
 2010.12.22 14:07. The example still works in 2010.12.21 10:50.

I attached the changes in code in strc-flt.mkiv and tabl-tsp.mkiv that break 
the above split table example. I hope this helps to identify the problem so it 
can be fixed in the current beta...

Thanks,
Florian



flt-tabl.diff
Description: Binary data
___
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
___

Re: [NTG-context] two problems with natural tables

2011-04-11 Thread Wolfgang Schuster

Am 11.04.2011 um 09:37 schrieb Florian Wobbe:

 so to make style=... also work on the header the trick was to change
  \bTH Header \eTH
 to
  \bTD Header \eTD.

Yes.

 What is the purpose of \bTH \eTH then? BTW the Wiki says: Please take 
 account of the fact, that the head cells are enclosed by \bTH and \eTH (and 
 not \[be]TC).
 
 \bTH seems to only override style=... since \bTD Header \eTD is repeated 
 correctly with \bTABLE[split=repeat,setups=table:style].

\bTH … \eTH is usefull when you want bold headers without any other changes on 
the style,
they prevent also alignment of the cell content when you try to align numbers 
while
\bTD … \eTD are better when you use the setup-commands.

Wolfgang

___
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
___


[NTG-context] two problems with natural tables

2011-04-10 Thread Florian Wobbe
Hi,

1) I tried the following minimal example from 
http://archive.contextgarden.net/message/20110109.151431.f774696a.en.html

\placetable[split]{Test}
{\bTABLE[split=yes]
\dorecurse{60}{
\bTR \bTD hello \eTD \eTR
}
\eTABLE}

with the current context versions which works fine. However, if I insert the 
code in a big project with many setups it fails with the attached error 
message. So there are setups which cause this error. Unfortunately I couldn't 
figure out what causes the problem.

I could determine the context version at which my big document fails: 
2010.12.22 14:07. The example still works in 2010.12.21 10:50.

Anyone got an idea which setups might cause this issue?

2) How do I get a small and bold header? This does not work:

\bTABLE
\setupTABLE[style=\tfx]
\setupTABLE[row][1][style=\bfx] % redundant w/ line 5
\bTABLEhead
\bTR[style=\bfx] \bTH Header \eTH \eTR
\eTABLEhead
\bTABLEbody
\bTR \bTD hello \eTD \eTR
\bTR \bTD world \eTD \eTR
\eTABLEbody
\eTABLE

Thanks!
Florian


! Missing number, treated as zero.

system   tex  error on line 178 in file test.tex: Missing number, 
treated as zero ...

173 \placetable[split]{Test}
174 {\bTABLE[split=yes]
175 \dorecurse{60}{
176 \bTR \bTD hello \eTD \eTR
177 }
178   \eTABLE}

to be read again 
   {
\docompletefloat ...\vbox \floatcaptionattribute {
  \doifelsemainfloatbody \cu...
argument ...loat {table}{}{split}{Test}\nextbox 
  \else \docompletefloat {ta...
\thirdofthreearguments #1#2#3-#3
 
\xdocompletefloat ...afloat ,#3}{#4}\nextbox \fi }
  \else \docompletefloat {#1...
\dodowithnextbox ...tefloat {table}{}{split}{Test}
  \doifnotinset \v!text {spl...
...
l.178 \eTABLE
 }

___
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
___