[NTG-context] enumeration numbering in the margin, title in body text

Tobias Columbus tobias.columbus at googlemail.com
Sat Mar 10 12:35:09 CET 2012


On Fri, Mar 09, 2012 at 07:05:55PM +0100, Wolfgang Schuster wrote:
> 
> Am 08.03.2012 um 11:49 schrieb Tobias Columbus:
> 
> > Hi all,
> > 
> > I am new to ConTeXt and asked myself if it is possible to have only
> > the number of an enumeration in the margin and the title in `serried`
> > position. Here is an example of what I think:
> > 
> > margin  | text
> > ---------------------------
> >        | blah blah
> >        | blah blah
> >     1.1| Definition (something): blah
> >        |
> >     1.2| Lemma: blah
> > 
> > After digging a while in the documentation and code, I came to the
> > conclusion that this is currently not possible. 
> > Then I tried some fiddling in the context code and this directly leads
> > to my second question: I modified the file strc-des.mkiv.
> > However, the changes seem to be ignored by my context binary. What 
> > did I do wrong? I also tried context --generate, but that also did not i
> > make context aware of my changes.
> 
> 
> You can use the annotation module:
> 
> \usemodule[annotation]
> 
> \define[2]\EnumerationCommand
>   {\inleft[scope=local,style=normal]{\placeannotationnumber}%
>    \placeannotationtext\doifsomething{\placeannotationtitle}{\space(\placeannotationtitle)}:\space
>    \placeannotationcontent}
> 
> \defineannotation[definition][text=Definition,alternative=command,command=\EnumerationCommand,prefixstopper=.]
> \defineannotation[lemma][definition][text=Lemma,counter=definition]
> 
> \starttext
> 
> \chapter{Test}
> 
> blah blah
> blah blah
> 
> \definition[title=something]{blah}
> 
> \lemma{blah}
> 
> \stoptext
> 
> Wolfgang

Hi,

The annotation module works perfect. This is exactly what I thought
of. 

Thanks! 
Tobias

> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at 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
> ___________________________________________________________________________________


More information about the ntg-context mailing list