[dev-context] Enhancements to core-des for theorems

Hans Hagen pragma at wxs.nl
Sat Jun 2 21:53:35 CEST 2007

Aditya Mahajan wrote:
> Hi Hans,
> I am attaching my enhancements for core-des. This takes care of most 
> of the needs for theorems with ConTeXt. I hope that I have not broken 
> anything. I have tested this with a 40 page documents, while Oliver, 
> Olaf, and Dalyoung have tested this with bigger documents. The test 
> files show different features.
> It takes care of a few bugs in enumerations, (and introduces new 
> ones... there is a suprious space somewhere which I can not find)
> Basically, more enhanced support for titles, and end of proof markers, 
> and makes sure that conversion=whatever works correctly.
      }}  <======= here is your space

           \showdntitle{#2} <======= here is another space
       %AM: Remaining part of \domakednnumbed

       \showdntitle{#2} <======= here is another space

most of the %'s you added are not needed, e.g. never after a \macroname

> For end of proof markers, say
  {\@EA\ifcase \csname dnendmarker\currentdescription\endcsname
%         {\pushright{\descriptionparameter\c!endmarker}}\fi}

this is what wordright was made for; maybe it can be improved but thsi 
qed stuff looks too complex to me (may also interfere with other things)

> \definetheorem[theorem][endmarker=\math{\square}] or whatever symbol 
> you want.
> Then a end of proof marker with will be placed at the \stoptheorem. 
> Sometimes, for example after an itemize, the end of thoerem marker may 
> appear on a line of its own. Then say \placenedmarker just before 
> \stopitemize
> To couple two enumerations
> \defineenumeration[theorem]
> \defineenumeration[proposition][theorem]
> To couple just the numbers
> \defineenumeration[theorem]
> \defineenumeration[proposition][usenumer=theorem]
> I cannot use number=theorem because number=yes|no is to enable disable 
> numbering. Maybe a better choice will be numbering=yes|no, and 
> number=counter. But that will break backward compatibility :(

will inherit and then you can set up proposition independently
> The main thing that needs to be done is to get end of proof markers to 
> work with formulas, but that is a bit difficult, so I have left it for 
> the future.
i need to give this some thought ...

endmark     -> endsymbol (we use symbol for other things; mark is too 
much related to marks)
usenumber  -> have to think of it, cloning happens more (\c!coupling is 
used low level)

There is some code i made for David Antos:
           \doif{\descriptionparameter\c!title}\v!yes % new, for david antos

did you check if his usage still works? (at least we need to tell David what to use now) 


                                          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

More information about the dev-context mailing list