![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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. \descriptionparameter\c!right% }} <======= here is your space \doifnot{#1}{-}{\rawreference\s!num{#1}{}}%
\strut\doshowdnnumber% \showdntitle{#2} <======= here is another space %AM: Remaining part of \domakednnumbed \descriptionparameter\c!left \showdntitle{#2} <======= here is another space \descriptionparameter\c!stopper most of the %'s you added are not needed, e.g. never after a \macroname
For end of proof markers, say
\def\placeendmarker {\@EA\ifcase \csname dnendmarker\currentdescription\endcsname \global\@EA\chardef\csname dnendmarker\currentdescription\endcsname\plusone \doifsomething{\descriptionparameter\c!endmarker} % {\pushright{\descriptionparameter\c!endmarker}}\fi} {\wordright{\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 :( \defineenumeration[proposition][theorem]
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 {\doattributes{\??dd\currentdescription}\c!titlestyle\c!titlecolor {\hskip\descriptionparameter\c!titledistance\begstrut#2\endstrut}}% did you check if his usage still works? (at least we need to tell David what to use now) 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 -----------------------------------------------------------------