On 1-3-2012 16:14, Wolfgang Schuster wrote:
Hi Hans,
there is a problem with sub enumerations and notes in the new construct code. As you can see in the example below there is no difference between \test and \subtest:
\starttext
\defineenumeration[test][text=Test,title=no]
\starttest One \stoptest
\startsubtest One \stopsubtest
\test Two\par
\subtest Two\par
\stoptext
The problem is here because both \test and \subtest expand to \strc_enumerations_command{test}, changing \currentenumeration to “#1” will fix it.
how about % to be considered: % % \let\??construction\??enumeration % % with push/pop (also at definition time) \unexpanded\def\strc_define_commands_enumeration#1#2#3% current level parent {\doifelsenothing{#3} {\normalexpanded{\defineconstruction[#1][\s!handler=\v!enumeration,\c!level=#2]}% \setevalue{\??enumeration#1:\s!parent }{\??enumeration}% }% {\normalexpanded{\defineconstruction[#1][#3][\s!handler=\v!enumeration,\c!level=#2]}% \setevalue{\??enumeration#1:\s!parent }{\??enumeration#3}% }% \setuevalue{\e!next #1}{\strc_enumerations_next }% \setuevalue{\c!reset#1}{\strc_enumerations_reset }% %setuevalue{\c!set #1}{\strc_enumerations_set }% \setuevalue {#1}{\strc_enumerations_command{#1}}% \setuevalue{\e!start#1}{\strc_enumerations_start {#1}}% \setuevalue{\e!stop #1}{\strc_enumerations_stop }} ----------------------------------------------------------------- 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 -----------------------------------------------------------------