Unable to use example from Excursion
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: ------------------------ ! 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) Further, I do not see the effect of \setupcaption[style=boldslanted] in example 11.10 (pp 34-35) I am using the minimals distribution, MKIV on Windows XP SP3. Thanks for the help, Alain
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
On 12 mars 2010, at 08:37, Aditya Mahajan wrote:
[…] A bug. \type inside a table caption does not work. Minimal example:
\starttext
\placetable [here,force] % not forece {Use of \type{\setuptables}} {}
\stoptext
Indeed. However it works fine with mkii. More generally the bug in mkiv concerns \type within \placeFLOAT, such as \placefigure: \starttext \placefigure {Use of \type{\placefigure}} % <--- this doesn't work {\externalfigure[lenna.jpg]} \placefigure {Use of {\tt \backslash placefigure}} % <--- this works {\externalfigure[lenna.jpg]} \stoptext Best regards: OK
On 12-3-2010 10:04, Otared Kavian wrote:
On 12 mars 2010, at 08:37, Aditya Mahajan wrote:
[…] A bug. \type inside a table caption does not work. Minimal example:
\starttext
\placetable [here,force] % not forece {Use of \type{\setuptables}} {}
\stoptext
Indeed. However it works fine with mkii. More generally the bug in mkiv concerns \type within \placeFLOAT, such as \placefigure:
\starttext \placefigure {Use of \type{\placefigure}} %<--- this doesn't work {\externalfigure[lenna.jpg]}
\placefigure {Use of {\tt \backslash placefigure}} %<--- this works {\externalfigure[lenna.jpg]} \stoptext
Best regards: OK
fixed 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 -----------------------------------------------------------------
Hi! Thanks to Aditya, Otared and Hans. I can carry on!! Alain Hans Hagen a écrit :
On 12-3-2010 10:04, Otared Kavian wrote:
On 12 mars 2010, at 08:37, Aditya Mahajan wrote:
[…] A bug. \type inside a table caption does not work. Minimal example:
\starttext
\placetable [here,force] % not forece {Use of \type{\setuptables}} {}
\stoptext
Indeed. However it works fine with mkii. More generally the bug in mkiv concerns \type within \placeFLOAT, such as \placefigure:
\starttext \placefigure {Use of \type{\placefigure}} %<--- this doesn't work {\externalfigure[lenna.jpg]}
\placefigure {Use of {\tt \backslash placefigure}} %<--- this works {\externalfigure[lenna.jpg]} \stoptext
Best regards: OK
fixed 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 ___________________________________________________________________________________
On Fri, 12 Mar 2010, Hans Hagen wrote:
fixed in next beta
The bug is still present in 2010.03.18. Here is a minimal example: \definetype[typeTEX][option=tex, style=type] \starttext \placefigure [top,bottom] [fig:something] {Do \type{\undefined} and \typeTEX{\undefined} work?} {} \stoptext which gives ! Undefined control sequence. \@@kjfiguretitle ->Do \type {\undefined } and \typeTEX {\undefined } work? \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... <argument> ...ypeTEX {\undefined } work?}\nextbox \else \docompletefloat {fi... \thirdofthreearguments #1#2#3->#3 ! Undefined control sequence. \@@kjfiguretitle ...ed } and \typeTEX {\undefined } work? \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... <argument> ...ypeTEX {\undefined } work?}\nextbox \else \docompletefloat {fi... \thirdofthreearguments #1#2#3->#3 ... l.8 {} Aditya
Am 19.03.10 16:03, schrieb Aditya Mahajan:
\placefigure [top,bottom] [fig:something] {Do \type{\undefined} and \typeTEX{\undefined} work?} Can’t resist.
{Do \expandafter\type\expandafter{\noexpand\undefined} and \expandafter\typeTEX\expandafter{\noexpand\undefined} work?} Wolfgang
participants (6)
-
Aditya Mahajan
-
Alain Delmotte
-
Alain Delmotte
-
Hans Hagen
-
Otared Kavian
-
Wolfgang Schuster