Re: [NTG-context] store counter or variable and reread again

2007-01-04 Thread Hans Hagen
� wrote: On Mon, 1 Jan 2007, Hans Hagen wrote: hm, long long ago i played with strategies for this ... the attached file shows some of this ... food for thought Thanks Hans, it's quite similar to my old LaTeX letter class option file, that I would like to port to ConTeXt. What

Re: [NTG-context] store counter or variable and reread again

2007-01-02 Thread Peter Münster
On Mon, 1 Jan 2007, Hans Hagen wrote: hm, long long ago i played with strategies for this ... the attached file shows some of this ... food for thought Thanks Hans, it's quite similar to my old LaTeX letter class option file, that I would like to port to ConTeXt. What is the difference

Re: [NTG-context] store counter or variable and reread again

2007-01-01 Thread Peter Münster
On Sat, 30 Dec 2006, Aditya Mahajan wrote: you will get two runs the first time you process the file, and a single run if you reprocess the file. By default, the maximum number of runs that you can have is 8, but you can change this by passing --runs= to texexec Hello, is it also possible

Re: [NTG-context] store counter or variable and reread again

2007-01-01 Thread Aditya Mahajan
On Mon, 1 Jan 2007, Peter Münster wrote: On Sat, 30 Dec 2006, Aditya Mahajan wrote: you will get two runs the first time you process the file, and a single run if you reprocess the file. By default, the maximum number of runs that you can have is 8, but you can change this by passing

Re: [NTG-context] store counter or variable and reread again

2007-01-01 Thread Peter Münster
On Mon, 1 Jan 2007, Aditya Mahajan wrote: is it also possible to specify the maximum number of runs in the TeX-file, for example \maxruns{11} ? AFAIU, no. I have not checked if runs=11 on top of the file is read. No, runs=11 is not read. But anyway, I would need something like

Re: [NTG-context] store counter or variable and reread again

2007-01-01 Thread Hans Hagen
On Mon, 1 Jan 2007, Aditya Mahajan wrote: is it also possible to specify the maximum number of runs in the TeX-file, for example \maxruns{11} ? AFAIU, no. I have not checked if runs=11 on top of the file is read. No, runs=11 is not read. But anyway, I would need something

Re: [NTG-context] store counter or variable and reread again

2007-01-01 Thread Hans Hagen
Aditya Mahajan wrote: Ahh, \lastpage uses \savecurrentvalue. I was pretty sure that I copied the twopass some time back from \lastpage. Maybe I was dreaming, maybe you are changing the internals too fast for me to keep up. Anyways, to make ammends, here is the solution using

Re: [NTG-context] store counter or variable and reread again

2006-12-31 Thread Thomas Engel
Aditya Mahajan wrote: \unprotect \def\addtocounter#1#2% #1 name #2 value [EMAIL PROTECTED] \protect % To Hans and Taco: Should the above macro be added to syst-ext? % Now lets define everything in terms of ConTeXt's counter macros \makecounter{Points} % % show the points on the

Re: [NTG-context] store counter or variable and reread again

2006-12-31 Thread Aditya Mahajan
On Sun, 31 Dec 2006, Thomas Engel wrote: Aditya Mahajan wrote: \unprotect \def\addtocounter#1#2% #1 name #2 value [EMAIL PROTECTED] \protect % To Hans and Taco: Should the above macro be added to syst-ext? % Now lets define everything in terms of ConTeXt's counter macros

Re: [NTG-context] store counter or variable and reread again

2006-12-30 Thread Aditya Mahajan
On Sat, 30 Dec 2006, Thomas Engel wrote: Hello, i just playing a little bit with macros. For adding points to a total sum i use this macros \global\newcount\summeP \summeP=0 % ad the points of each question \def\getPunkte[#1]{\global\advance\summeP by \number#1} % show the points

Re: [NTG-context] store counter or variable and reread again

2006-12-30 Thread Peter Münster
On Sat, 30 Dec 2006, Aditya Mahajan wrote: % Now the rest of the magic to take care of the two pass run % Basically this says that rerun if \nofPoints != % \countervalue{Points}. In the next run we set \nofPoints to the % previous value of \countervalue{Points} (the \checkPoints macro in %

Re: [NTG-context] store counter or variable and reread again

2006-12-30 Thread Aditya Mahajan
On Sat, 30 Dec 2006, Peter Münster wrote: On Sat, 30 Dec 2006, Aditya Mahajan wrote: % Now the rest of the magic to take care of the two pass run % Basically this says that rerun if \nofPoints != % \countervalue{Points}. In the next run we set \nofPoints to the % previous value of

Re: [NTG-context] store counter or variable and reread again

2006-12-30 Thread Hans Hagen
Aditya Mahajan wrote: On Sat, 30 Dec 2006, Peter M�nster wrote: On Sat, 30 Dec 2006, Aditya Mahajan wrote: % Now the rest of the magic to take care of the two pass run % Basically this says that rerun if \nofPoints != % \countervalue{Points}. In the next run we set \nofPoints to

Re: [NTG-context] store counter or variable and reread again

2006-12-30 Thread Aditya Mahajan
On Sat, 30 Dec 2006, Hans Hagen wrote: Aditya Mahajan wrote: On Sat, 30 Dec 2006, Peter M???nster wrote: On Sat, 30 Dec 2006, Aditya Mahajan wrote: % Now the rest of the magic to take care of the two pass run % Basically this says that rerun if \nofPoints != %

Re: [NTG-context] store counter or variable and reread again

2006-12-30 Thread Aditya Mahajan
On Sat, 30 Dec 2006, Aditya Mahajan wrote: On Sat, 30 Dec 2006, Hans Hagen wrote: how about \savecurrentvalue\SomeVar{someval} I was just copying the way it is done with other macros \lastpage, etc. I will look at \savecurrentvalue also. Ahh, \lastpage uses \savecurrentvalue. I