On 8/29/07, Wolfgang Werners-Lucchini wrote:
how can I start an itemization with 2
I have tried snippets like
\setupitemgroup[[itemize][start=2] \startitemize[n] \item zwei \item drei \stopitemize
but could'nt found a solution.
It looks like a misfeature (ie. bug) to me.
But two questions remain:
1) I am wondering, how you find such answers. What is your strategie searching the sources? 2) What is that existing option 'start' for? Take this as an example for question 1).
As far as I can see, 'start' currently serves no purpose since it gets overridden in line 447 in \expanded{\setitemparameter{\itemlevel}{\c!start}{1}}% in core-itm.tex anyway. Try to comment out that line. The next problem lies a few lines below: \doifelsenothing{\getitemparameter\itemlevel\c!start} {\def\currentitemoffset{1}} {\def\currentitemoffset{\getitemparameter\itemlevel\c!start}% \letitemparameter\itemlevel\c!start\empty}% You need to say \edef instead of \def, otherwise the empty value will be used for calculating \currentitemoffset. How to search? It's difficult to tell, but in this particular case, you take a look into core-itm.tex (assuming you know where itemizations are. If you don't, you can execute "grep \setupitem *" in tex/context/base/.) Then, you search for \c!start and try to figure out where it is used. You find \setitemlevel. OK, great. What does it do there? It's supposed to change \currentitemoffset. If you want to check \currentitemoffset, you simply place (my debug: \currentitemoffset) at the end of \setitemlevel. Now, you either need to copy that definition on the top of your document (which will override the global one), or remake the formats with "texexec --make en" before running texexec on your document again. You will get some extra info on top of your itemization. It doesn't belong there, but you will remove it afterwards. (Did I forget to say that it might be wise to make a bacup of the original file?) Now when you remade the formats (or placed the definition on top of your file or to cont-new.tex) and compiled the document again, take a look at the result. Oh, well, you only get (my debug: ). \currentitemoffset seems to be empty. Then try to put (I wanted to have: \getitemparameter\itemlevel\c!start) somewhere at the beginning of \setitemlevel, somewhere inbetween (after \expandex{...}) and somewhere at the end. It works at the beginning, then it gets reset to 1, and then it gets deleted. And they you try to figure out why. Btw: the two modifications mentioned above don't solve the problem yet, since you now have a problem with offset +1 (I remember a bug report from not so long ago, when itemizations started with 0, so that might be related). But I would better leave that for Hans. Itemizations are so complex that I don't dare to touch anything there. Mojca