Re: [NTG-context] Numberconversion problem in caption prefixes
Thank you Wolfgang, it does what I want. However, I realised after trying the following code inside environments (frontmatter, bodymatter, backmatter and appendices) that the default behaviour is WRONG because the conversions of prefixes are not always automatic. For instance, in the appendix environment, by default chapter numbers are Characters and every prefix representing a chapter number is also a Character (section prefixes, caption prefixes and so on). Now if you decide to switch chapter numbers to Romannumerals, you will get something totally inconsistent if you don’t do many conversions manually: *\startsectionblockenvironment[appendix]* * \defineconversionset[romannumeralsconversionset][][R]* * \setuphead[chapter][sectionconversionset=romannumeralsconversionset]* *\stopsectionblockenvironment* *\starttext* *\startappendices* *\chapter{Cool}* *\placefigure{A cow}{\externalfigure[cow]}* *\chapter{Cat}* *\section{Mouse}* *\section{Dog}* *\placefigure{A cow}{\externalfigure[cow]}* *\stopappendices* *\stoptext* which gives: *I Cool* *[figure] Figure I.I Cow % <-- Here the prefix conversion from 'A' to 'I' works.* *II Cat* *B.1 Mouse % <-- Here the prefix conversion from 'B' to 'II' does NOT work.* *B.2 Dog % <-- Here the prefix conversion from 'B' to 'II' does NOT work.* *[figure] Figure B.II Cow % <-- Here the prefix conversion from 'B' to 'II' does NOT work (because of the presence of the 2 sections B.1 and B.2 where the prefix conversion already did not work I think, so here is the BUG).* Extra: is it normal that caption NUMBERS (not prefixes) are converted to Romannumerals by default INSIDE the appendix environment (outside they are usual numbers)? ('Figure I.I Cow' and 'Figure B.II Cow' instead of 'Figure A.1 Cow' and 'Figure B.2 Cow'.)
Am 21.11.2013 um 21:01 schrieb Géry Ogam
Thank you Wolfgang, it does what I want.
However, I realised after trying the following code inside environments (frontmatter, bodymatter, backmatter and appendices) that the default behaviour is WRONG because the conversions of prefixes are not always automatic.
For instance, in the appendix environment, by default chapter numbers are Characters and every prefix representing a chapter number is also a Character (section prefixes, caption prefixes and so on). Now if you decide to switch chapter numbers to Romannumerals, you will get something totally inconsistent if you don’t do many conversions manually:
\startsectionblockenvironment[appendix] \defineconversionset[romannumeralsconversionset][][R] \setuphead[chapter][sectionconversionset=romannumeralsconversionset] \stopsectionblockenvironment
\starttext
\startappendices \chapter{Cool} \placefigure{A cow}{\externalfigure[cow]} \chapter{Cat} \section{Mouse} \section{Dog} \placefigure{A cow}{\externalfigure[cow]}
\stopappendices
\stoptext
\defineconversionset [appendix:headconversionset] [n,R] [n] \defineconversionset [appendix:floatconversionset] [] [n] \setuphead[sectionconversionset=headconversionset] \setupcaption[numberconversionset=floatconversionset] \starttext \startappendices \chapter{Cool} \placefigure{A cow}{\externalfigure[cow]} \chapter{Cat} \section{Mouse} \section{Dog} \placefigure{A cow}{\externalfigure[cow]} \stopappendices \stoptext Wolfgang
participants (2)
-
Géry Ogam
-
Wolfgang Schuster