enumeration numbering in the margin, title in body text
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. Any help would be appreciated Tobias
On 2012-03-08 Tobias Columbus
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.
\setupitemize [inmargin]
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 have to recreate the format as well: context --generate && context --make Regards Marco
Am 08.03.2012 um 12:10 schrieb Marco:
On 2012-03-08 Tobias Columbus
wrote: 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.
\setupitemize [inmargin]
Then I tried some fiddling in the context code and this directly leads to my second question: I modified the file strc-des.mkiv.
The enumeration code is in strc-itm.mkvi, the file strc-des.mkvi (or strc-des.mkiv in older versions) is for the description code.
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 have to recreate the format as well:
context --generate && context --make
You need “context --generate” only when you add new files. Wolfgang
On Thu, 8 Mar 2012, Wolfgang Schuster wrote:
Am 08.03.2012 um 12:10 schrieb Marco:
On 2012-03-08 Tobias Columbus
wrote: 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.
\setupitemize [inmargin]
Then I tried some fiddling in the context code and this directly leads to my second question: I modified the file strc-des.mkiv.
The enumeration code is in strc-itm.mkvi, the file strc-des.mkvi (or strc-des.mkiv in older versions) is for the description code.
@Wolfgang: You are mixing enumeration and item groups. The new enumeration code is in strc-enu.mkvi. @Tobias: You can try playing around with titlecommand and numbercommand parameters. Aditya
Am 08.03.2012 um 20:50 schrieb Aditya Mahajan:
On Thu, 8 Mar 2012, Wolfgang Schuster wrote:
Am 08.03.2012 um 12:10 schrieb Marco:
On 2012-03-08 Tobias Columbus
wrote: 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.
\setupitemize [inmargin]
Then I tried some fiddling in the context code and this directly leads to my second question: I modified the file strc-des.mkiv.
The enumeration code is in strc-itm.mkvi, the file strc-des.mkvi (or strc-des.mkiv in older versions) is for the description code.
@Wolfgang: You are mixing enumeration and item groups. The new enumeration code is in strc-enu.mkvi.
D’oh!
@Tobias: You can try playing around with titlecommand and numbercommand parameters.
Or simply use inmargin or leftmargin for the alternative key. Wolfgang
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
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@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 ___________________________________________________________________________________
participants (4)
-
Aditya Mahajan
-
Marco
-
Tobias Columbus
-
Wolfgang Schuster