On Thu, 9 Nov 2006, Jeff Smith wrote:
On 11/7/06, Aditya Mahajan
wrote: I need this functionality for a project (IEEE conference style), so here is hack to get the feature. The referencing also works.
Use with caution, can break existing macros.
Wow, thanks a lot! This works as expected. In what situation can it break existing macros? I intend to use that extensively but in a fairly simple document (a thesis... yeah, another one in ConTeXt!). Is there anything I should _not_ do?
In principle, it should work fine for european languages. Lot of the trickery with numbers and number formats is present because ConTeXt also supports other languages like chinese and arabic. @@longsectionnumber is used a lot by the sectioning macros, and I do not completely understand what is happening here. My solution was based on trial and error and figuring out what works. Moreover, it changes a core feature of ConTeXt. I am associating separators with sectioning levels rather than with heads. Right now, in principle, you can have different separators for different heads at the same level. For example \setuphead[remark][section=section-4,separator=.] \setuphead[note][section=section-4,separator=-] With this change, this will no longer work. So, the macro is not backward compatible, and thus can break existing code. If you have only one head at each sectioning level, and do not plan to use Chinese or Arabic, it should work fine. Atleast for my simple, 5 page document, it works correctly :-) Aditya