On Thu, 11 Mar 2010, Alain Delmotte wrote:

Hi!

I am going through "ConTeXt an excursion", but I cann't get the example of table 11.9 (page 34, source pp 32-33) to work.
I always get an error:
------------------------

A bug. \type inside a table caption does not work. Minimal example:


\starttext

\placetable
    [here,forece]
    {Use of \type{\setuptables}}
    {}

\stoptext

! Argument of \docheckifiteminsetelse has an extra }.
<inserted text>
              \par
<to be read again>
                 }
\@@kjtabletitle ->Use of \type {\setuptables }
                                            .
\doif #1#2->\edef \!!stringa {#1
}\edef \!!stringb {#2}\ifx \!!stringa \!!str...
\dostructurecountercomponent ...\c!title }\v!none
{\setfalse \hasstructureco...
\docompletefloat ...c!title ={#4},\c!bookmark =][]
\globallet \currentfloatnu...
...
l.420 \stopcombination
                   ?
------------------------
I have tried to comment different parts of the code, but this didn't help (even if the error changed).
The code is exactly the code from the book (copy/paste from the .pdf)

This works (copy pasted from the source and remove the \ in the caption)

\starttext
\startbuffer
\placetable
  [here,force]
  [tab:setuptable]
  {Use of \type{setuptables}.}
{\startcombination[1*3]
{\setuptables[bodyfont=10pt]
\starttable[|c|c|c|c|c|c|]
\HL
\VL \use6 \JustCenter{Decline of wealth in
                      Dutch florine (Dfl)} \VL\SR
\HL
\VL Year \VL 1.000--2.000
         \VL 2.000--3.000
         \VL 3.000--5.000
         \VL 5.000--10.000
         \VL   over 10.000 \VL\SR
\HL
\VL 1675 \VL 22 \VL 7 \VL 5  \VL 4  \VL 5  \VL\FR
\VL 1724 \VL ~4 \VL 4 \VL -- \VL 4  \VL 3  \VL\MR
\VL 1750 \VL 12 \VL 3 \VL 2  \VL 2  \VL -- \VL\MR
\VL 1808 \VL ~9 \VL 2 \VL -- \VL -- \VL -- \VL\LR
\HL
\stoptable}{\tt bodyfont=10pt}
{\setuptables[bodyfont=8pt]
\starttable[|c|c|c|c|c|c|]
\HL
\VL \use6 \JustCenter{Decline of wealth in
                      Dutch florine (Dfl)} \VL\SR
\HL
\VL Year \VL 1.000--2.000
         \VL 2.000--3.000
         \VL 3.000--5.000
         \VL 5.000--10.000
         \VL   over 10.000 \VL\SR
\HL
\VL 1675 \VL 22 \VL 7 \VL 5  \VL 4  \VL 5  \VL\FR
\VL 1724 \VL ~4 \VL 4 \VL -- \VL 4  \VL 3  \VL\MR
\VL 1750 \VL 12 \VL 3 \VL 2  \VL 2  \VL -- \VL\MR
\VL 1808 \VL ~9 \VL 2 \VL -- \VL -- \VL -- \VL\LR
\HL
\stoptable}{\tt bodyfont=8pt}
{\setuptables[bodyfont=6pt,distance=small]
\starttable[|c|c|c|c|c|c|]
\HL
\VL \use6 \JustCenter{Decline of wealth in
                      Dutch florine (Dfl)} \VL\SR
\HL
\VL Year \VL 1.000--2.000
         \VL 2.000--3.000
         \VL 3.000--5.000
         \VL 5.000--10.000
         \VL   over 10.000 \VL\SR
\HL
\VL 1675 \VL 22 \VL 7 \VL 5  \VL 4  \VL 5  \VL\FR
\VL 1724 \VL ~4 \VL 4 \VL -- \VL 4  \VL 3  \VL\MR
\VL 1750 \VL 12 \VL 3 \VL 2  \VL 2  \VL -- \VL\MR
\VL 1808 \VL ~9 \VL 2 \VL -- \VL -- \VL -- \VL\LR
\HL
\stoptable}{\tt bodyfont=6pt,distance=small}
\stopcombination}
\stopbuffer


\typebuffer

\getbuffer
\stoptext


Further, I do not see the effect of \setupcaption[style=boldslanted] in example 11.10 (pp 34-35)

Typo in the manual. It should be

\setupcaptions[style=...]

or

\setupcaption[table][style=...]

if you just want to change the captions for tables.

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to