Aditya Mahajan wrote:
On Tue, 14 Nov 2006, Hans Hagen wrote:
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?
hm, can on esummarize what will break macros? (i was away for a week with time for email)
A patch that I sent to Jeff. There is a problem with separators and setuphead. I have summarized the problem and a possible patch in the attached file. However, I do not know if it will break something in multi-lingual documents (esp. Arabic), so I sent the patch with a disclaimer. i took a quick look at it; the problem is that it will mess up other things; the period in fullsectionnumber is a placeholder that will be replaced later on; the actual code where things happen in \doseparatednumber and it's not that easy to hook level dependent separators in there
(i will reimplement sectionnumbering some day soon due to some other pending issues) anyhow, here's another approach: \starttext \unexpanded\def\seplist#1% {\ifx\sepnumber\undefined\def\sepnumber{0}\fi \increment\sepnumber \getfromcommacommand[#1][\sepnumber]% \ifx\commalistelement\empty \getcommalistsize[#1]% \def\sepnumber{\number\commalistsize}% \getfromcommacommand[#1][\sepnumber]% \fi \commalistelement} % \setuphead[section] [separator=\seplist{?,!,*}] % \setuphead[subsection][separator=\seplist{??,!!,**}] \let\spr\seplist % quick hack % \setuphead[section] [separator={?,!,*}] % \setuphead[subsection][separator={??,!!,**}] \setupheads[separator={A,B,C,D,E,F}] \chapter{test} \section{test} \subsection{test} \subsection{test} \section{test} \subsection{test} \subsection{test} \stoptext 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 -----------------------------------------------------------------