From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93795 Path: news.gmane.org!not-for-mail From: massifr@fastwebnet.it Newsgroups: gmane.comp.tex.context Subject: late reset of counter with way=bypage Date: Thu, 18 Feb 2016 18:15:55 +0100 Message-ID: <103989621.vAF2laLy34@max> Reply-To: massifr@fastwebnet.it, mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1023994322611906839==" X-Trace: ger.gmane.org 1455815829 3476 80.91.229.3 (18 Feb 2016 17:17:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Feb 2016 17:17:09 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 18 18:16:55 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aWSCC-0002Iv-A6 for gctc-ntg-context-518@m.gmane.org; Thu, 18 Feb 2016 18:16:52 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B3C496D39; Thu, 18 Feb 2016 18:16:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YSqauSmVLzgN; Thu, 18 Feb 2016 18:16:09 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id D21B86D3B; Thu, 18 Feb 2016 18:16:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6DF2C6D37 for ; Thu, 18 Feb 2016 18:16:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OFbjp-yhfoZ4 for ; Thu, 18 Feb 2016 18:16:07 +0100 (CET) Original-Received: from mr004msr.fastwebnet.it (mr004msr.fastwebnet.it [85.18.95.67]) by zapf.ntg.nl (Postfix) with ESMTP id 2DA0E6D36 for ; Thu, 18 Feb 2016 18:15:57 +0100 (CET) Original-Received: from max.localnet (2.225.185.111) by mr004msr.fastwebnet.it (8.5.140.03) (authenticated as massifr) id 56B4605F00FDFF2D for ntg-context@ntg.nl; Thu, 18 Feb 2016 18:15:56 +0100 User-Agent: KMail/4.14.10 (Linux/4.3.0-1-686-pae; KDE/4.14.14; i686; ; ) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:93795 Archived-At: This is a multi-part message in MIME format. --===============1023994322611906839== Content-Type: multipart/alternative; boundary="nextPart2421080.udYVEmR1oS" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart2421080.udYVEmR1oS Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 --nextPart2421080.udYVEmR1oS Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

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

 

--nextPart2421080.udYVEmR1oS-- --===============1023994322611906839== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1023994322611906839==--