Taco Hoekwater wrote:


Hi David,

Not sure if you are still interested, but here is my "optional title"
hack, revamped for a modern context distro. It creates a second
extra optional argument for the enumeration, nothing too fancy.
The example also shows a way in which you can access the number.

This does not solve the list generation, sorry.

Cheers, Taco

%===========

\unprotect
\def\dododefinecomplexenumeration#1#2#3%
  {\setvalue{\e!start#1#2}%
     [EMAIL PROTECTED] dostart#1#2\endcsname}%
   \setvalue{dostart#1#2}[##1][##2]%
     {\begingroup\setvalue{#2title}{##2}\getvalue{\e!start#1i#2}[##1]}%
   \setvalue{\e!stop#1#2}{\getvalue{\e!stop#1i#2}\endgroup}}

\def\dodefinecomplexenumeration[#1][#2]%
  {\defineenumeration[i#1]
      [\c!text=#1,\c!stopper=\getvalue{do#1title},#2]%
   \setvalue{do#1title}%
      {\doifnotemptyvalue{#1title}{~(\getvalue{#1title})}}%
   \dododefinecomplexenumeration{}{#1}{#2}%
   \dododefinecomplexenumeration{\v!sub}{#1}{#2}%
   \dododefinecomplexenumeration{\v!sub\v!sub}{#1}{#2}%
   \dododefinecomplexenumeration{\v!sub\v!sub\v!sub}{#1}{#2}}

\def\definecomplexenumeration{\dodoubleempty\dodefinecomplexenumeration}

\protect

\definecomplexenumeration[lemma]

\starttext

\startlemma[lemma1][with a title]
This is lemma \rawnumber[\currentdescriptionnumber]
\stoplemma

\startsublemma[sublemma1][with another title]
This is sublemma \rawnumber[sub\currentdescriptionnumber]
\stopsublemma

\stoptext

ok, i can cook up something along these lines Hans
-----------------------------------------------------------------
                                         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
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to