[NTG-context] numbered subitems

Alan Bowen acbowen at Princeton.EDU
Thu Oct 4 14:55:01 CEST 2007


Hi, Aditya—

This works perfectly (after changing the Yen-signs for backslashes).  
It behaves as expected when adapted and will be a great help in  
producing a number of the TOCs that are on my horizon. Many thanks  
for your time and help!

All best, Alan

> On Oct 1, 2007, at 8:11 PM, Aditya Mahajan wrote:
>
>> Hi Alan,
>> On Mon, 1 Oct 2007, Alan Bowen wrote:
>>> 1. History
>>> 	1.1 Pre-Greek (Babylonian and Egyptian) sundials
>>> 	1.2 Greek and Roman sundials
>>> 	1.3 Byzantine sundials
>>> is the goal. Sadly, adding “serried” destroys the indentation of the
>>> subitems.
>> I could not find a clean way to do this. So, I redefined
>> ¥checkforrepeatedlistitem. Hans, isn't there a clean way to do this?
>> ¥setupitemize[1][fit,broad]
>> ¥setupitemize[2][width=2em]
>> ¥setupitemize[each][n]
>> ¥def¥checkforrepeatedlistitem
>>   {¥ifnum¥itemlevel=¥plusone
>>      ¥initializeboxstack{item}%
>>    ¥fi
>>    ¥ifconditional¥repeatlistitem
>>       ¥savebox{item}{¥itemlevel}{¥hbox{¥copy8}}%
>>       ¥setbox8¥hbox %to ¥wd8
>>        {¥setbox¥scratchbox¥hbox
>>           {¥scratchcounter¥itemlevel
>>            ¥advance¥scratchcounter¥minusone
>>            ¥dorecurse¥scratchcounter{¥foundbox{item} 
>> {¥recurselevel}}}%
>>         ¥ifnum¥itemlevel>¥plusone
>>           ¥ifdim¥wd¥scratchbox>¥zeropoint
>>            %¥hskip-¥dimen2
>>             ¥box¥scratchbox
>>           ¥fi
>>         ¥fi
>>         ¥box8 }%
>>    ¥fi}
>> ¥starttext
>> ¥startitemize[repeat]
>>   ¥item item 1
>>     ¥startitemize
>>       ¥item item 1.1
>>       ¥item item 1.2
>>       ¥item item 1.3
>>     ¥stopitemize
>>   ¥item item 2
>>     ¥startitemize
>>       ¥item item 2.1
>>       ¥item  item 2.2
>>       ¥item item 2.3
>>     ¥stopitemize
>>   ¥item item 3
>>     ¥startitemize
>>       ¥item  item 3.1
>>       ¥item  item 3.2
>>     ¥stopitemize
>> ¥stopitemize
>> ¥stoptext
>> Aditya



More information about the ntg-context mailing list