section conversion gets lost in MKIV
Dear list, Here's a minimal example that work correct in MKII, but wrong in MKIV: \setupsection [chapter] [conversion=Characters] \setupsection [section] [conversion=] \starttext \chapter{first} \section{subfirst} \stoptext It results in A first 1.1 subfirst while it should keep "A.1" instead of "1.1" for the section numbering. Mojca
On 30-8-2010 10:34, Mojca Miklavec wrote:
Dear list,
Here's a minimal example that work correct in MKII, but wrong in MKIV:
\setupsection [chapter] [conversion=Characters] \setupsection [section] [conversion=]
\starttext \chapter{first} \section{subfirst} \stoptext
It results in A first 1.1 subfirst while it should keep "A.1" instead of "1.1" for the section numbering.
The new way is: \definestructureconversionset[MySet][numbers,Characters][numbers] % [per level] [default] \setupsection [chapter] [sectionconversionset=MySet] \starttext \chapter{first} \section{subfirst} \stoptext What you observe is 'conversion' being inherited and makins both the conversionsets and conversion work as you want will mess up much code so I think that I will remove the 'conversion' key completely in favor of the set. Keep in mind that we now keep more status info around and more or less local conversion settings (after all then can be changed each moment) is not part of that. So, a next release will drop 'conversion' ... better not that unpredictable. 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 -----------------------------------------------------------------
Hi,
Is there a documentation and/or extensive example of the conversionset
feature (and others) somewhere? The comments in the source files (on
the wiki) are kind of scarce and I can't quite figure out how to use
them.
Thanks.
-- Cédric
On Mon, Aug 30, 2010 at 13:23, Hans Hagen
On 30-8-2010 10:34, Mojca Miklavec wrote:
Dear list,
Here's a minimal example that work correct in MKII, but wrong in MKIV:
\setupsection [chapter] [conversion=Characters] \setupsection [section] [conversion=]
\starttext \chapter{first} \section{subfirst} \stoptext
It results in A first 1.1 subfirst while it should keep "A.1" instead of "1.1" for the section numbering.
The new way is:
\definestructureconversionset[MySet][numbers,Characters][numbers] % [per level] [default]
\setupsection [chapter] [sectionconversionset=MySet]
\starttext
\chapter{first} \section{subfirst}
\stoptext
What you observe is 'conversion' being inherited and makins both the conversionsets and conversion work as you want will mess up much code so I think that I will remove the 'conversion' key completely in favor of the set. Keep in mind that we now keep more status info around and more or less local conversion settings (after all then can be changed each moment) is not part of that.
So, a next release will drop 'conversion' ... better not that unpredictable.
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 ___________________________________________________________________________________
On 31-8-2010 1:07, Cedric Mauclair wrote:
Is there a documentation and/or extensive example of the conversionset feature (and others) somewhere? The comments in the source files (on the wiki) are kind of scarce and I can't quite figure out how to use them.
it's just a list of conversions starting with the one for 'part' and the second arg is the default so [numbers,characters,greek][numbers] will number parts 1..n, chapters a..z and sections alpha..omega and all below that as 1..n ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Tue, Aug 31, 2010 at 13:30, Hans Hagen
On 31-8-2010 1:07, Cedric Mauclair wrote:
Is there a documentation and/or extensive example of the conversionset feature (and others) somewhere? The comments in the source files (on the wiki) are kind of scarce and I can't quite figure out how to use them.
it's just a list of conversions starting with the one for 'part' and the second arg is the default so
[numbers,characters,greek][numbers]
will number parts 1..n, chapters a..z and sections alpha..omega and all below that as 1..n All right, I'm starting to get it, for "conversionset" at least. I still have some questions though.
1. To what do "P" and "P.N" refer to in strc-ini.mkiv? 2. What does the little table mean ("reference, mark, list, text" against "section, float, etc.")? I see there is something going on with the next few lines, but I don't clearly see how to use the table. Thanks.
----------------------------------------------------------------- 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 -----------------------------------------------------------------
On 31-8-2010 4:28, Cedric Mauclair wrote:
On Tue, Aug 31, 2010 at 13:30, Hans Hagen
wrote: On 31-8-2010 1:07, Cedric Mauclair wrote:
Is there a documentation and/or extensive example of the conversionset feature (and others) somewhere? The comments in the source files (on the wiki) are kind of scarce and I can't quite figure out how to use them.
it's just a list of conversions starting with the one for 'part' and the second arg is the default so
[numbers,characters,greek][numbers]
will number parts 1..n, chapters a..z and sections alpha..omega and all below that as 1..n All right, I'm starting to get it, for "conversionset" at least. I still have some questions though.
1. To what do "P" and "P.N" refer to in strc-ini.mkiv?
prefix ... some numbers, like a figurenumber can have the section number as prefix and all that is kept track of so that in a table of contents (of ref) one can have different formatting rules
2. What does the little table mean ("reference, mark, list, text" against "section, float, etc.")? I see there is something going on with the next few lines, but I don't clearly see how to use the table.
reference, mark, list, text are the text variants (so a bookmark or list entry can be different from the title shown as section) ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (3)
-
Cedric Mauclair
-
Hans Hagen
-
Mojca Miklavec