Re: [NTG-context] late reset of counter with way=bypage
Solved with a workaround > - > \setupnotation[footnote][way=bypage] > > \definecounter[authornote][way=bypage] > > % taken and adapted from > https://www.mail-archive.com/ntg-context@ntg.nl/msg56637.html > \define[1]\authorNote{\bgroup% >\savecounter[footnote]% \incrementcounter[authornote]\decrementcounter[authornote]% <-- authornote is incremented and decremented to force the reset by page >\setcounter[footnote][{\rawcountervalue[authornote]}]% >\setupnotation[footnote][numberconversion=set 1]% >\footnote{#1}% >\restorecounter[footnote]% >\incrementcounter[authornote]% >\egroup} > > \starttext > > First footnote\footnote{First footnote}. > First author's footnote\authorNote{First author's footnote}. > Second footnote\footnote{Second footnote}. > Second author's footnote\authorNote{Second author's footnote}. > > \page > > First footnote\footnote{First footnote}. > First author's footnote\authorNote{First author's footnote}. > Second footnote\footnote{Second footnote}. > Second author's footnote\authorNote{Second author's footnote}. > > \stoptext > - Wolfgang Schuster already answered me on this (see https://www.mail-archive.com/ntg-context%40ntg.nl/msg78847.html): > It’s a bug and hopefully fixed in a new beta but the counter is only reset > when you increment the value. If you need the value of a counter with "way=bypage" without modifying its value, the workaround is: - increment the counter to force its reset by page - decrement it to get the correct current value Greetings, Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] late reset of counter with way=bypage
Hello list, this is an example of footnotes with two different markers (and counters): numbers for editor's footnotes, stars for author's footnotes. The footnotes are typeset together, in the order they appear in the text, so number and star markers are interspersed. The two counters are reset every page (way=bypage). - \setupnotation[footnote][way=bypage] \definecounter[authornote][way=bypage] % taken and adapted from https://www.mail-archive.com/ntg-context@ntg.nl/msg56637.html \define[1]\authorNote{\bgroup% \savecounter[footnote]% \setcounter[footnote][{\rawcountervalue[authornote]}]% \setupnotation[footnote][numberconversion=set 1]% \footnote{#1}% \restorecounter[footnote]% \incrementcounter[authornote]% \egroup} \starttext First footnote\footnote{First footnote}. First author's footnote\authorNote{First author's footnote}. Second footnote\footnote{Second footnote}. Second author's footnote\authorNote{Second author's footnote}. \page First footnote\footnote{First footnote}. First author's footnote\authorNote{First author's footnote}. Second footnote\footnote{Second footnote}. Second author's footnote\authorNote{Second author's footnote}. \stoptext - The problem: the first authorNote of the second page has its counter set to 3 instead of 1 (you see 3 stars as marker). The second authorNote has the right value of 2 (2 stars as marker). This means that "way=bypage" works for the authornote counter too, but one step late. What am I missing? Some \iftrialtypesetting? Greetings, Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___