From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93357 Path: news.gmane.org!not-for-mail From: "Meer, Hans van der" Newsgroups: gmane.comp.tex.context Subject: Re: pagereferences Date: Sun, 17 Jan 2016 19:43:32 +0000 Message-ID: <730102E8-820B-4952-A87B-193ADBB7168A@uva.nl> References: <569BC47F.2010107@gmail.com> <50141C9E-4337-4197-96A8-0B679371618B@uva.nl> <569BDF4E.2020800@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0366559549664139187==" X-Trace: ger.gmane.org 1453059849 9406 80.91.229.3 (17 Jan 2016 19:44:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2016 19:44:09 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 17 20:43:58 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 1aKtEx-0007pg-IW for gctc-ntg-context-518@m.gmane.org; Sun, 17 Jan 2016 20:43:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8365D69C; Sun, 17 Jan 2016 20:43:46 +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 6OrEfr27tyOH; Sun, 17 Jan 2016 20:43:45 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 5C061806; Sun, 17 Jan 2016 20:43:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 720E969C for ; Sun, 17 Jan 2016 20:43:43 +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 4vQBh49bQK-R for ; Sun, 17 Jan 2016 20:43:42 +0100 (CET) Original-Received: from HUB02.uva.nl (hub02.uva.nl [146.50.108.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id DEA5E547 for ; Sun, 17 Jan 2016 20:43:32 +0100 (CET) Original-Received: from MBX02.uva.nl ([169.254.2.99]) by HUB02.uva.nl ([2002:9232:6ce7::9232:6ce7]) with mapi id 14.03.0266.001; Sun, 17 Jan 2016 20:43:32 +0100 Thread-Topic: [NTG-context] pagereferences Thread-Index: AQHRUT/epGzxGqWMZ0WpAn+eLeDYdZ7/2OSAgAAWhYCAAAlwAIAAEpOA In-Reply-To: <569BDF4E.2020800@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [84.106.134.200] x-endpointsecurity-0xde81-ev: v:6.2.7.696, d:out, a:y, w:t, t:15, sv:1453054643, ts:1453059812 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:93357 Archived-At: --===============0366559549664139187== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_730102E8820B4952A87B193ADBB7168Auvanl_" --_000_730102E8820B4952A87B193ADBB7168Auvanl_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Wolfgang. I am experimenting with your code and there has arisen a p= roblem. The book I am typesetting has some pages before the text on page-1 = starts (cover and so on). Therefore the code \def\mypageref[#1]{\setpagestate[hvdm][#1]\color[red]{page=3D\pagenumbe= r\ and pageref=3D\pagestaterealpage{hvdm}{#1}}} produces "page=3D29 and pageref=3D31". Not as intended. Do I change the mac= ro \pagestaterealpage into what macro? I tried \pagestatepage, but that was= n't the right idea. Now what further to change? Hans van der Meer On 17 Jan 2016, at 19:37, Wolfgang Schuster > wrote: \definepagestate[hans] \starttext One\setpagestate[hans][one] \page[+2] Two\setpagestate[hans][two] Three\setpagestate[hans][three] \blank \ifnum0\pagestaterealpage{hans}{two}=3D0\pagestaterealpage{hans}{one} The references are on the same page. \else The references are on different pages. \fi \blank \ifnum0\pagestaterealpage{hans}{two}=3D0\pagestaterealpage{hans}{three} The references are on the same page. \else The references are on different pages. \fi \stoptext --_000_730102E8820B4952A87B193ADBB7168Auvanl_ Content-Type: text/html; charset="us-ascii" Content-ID: <6433BD044BD8FB4F8B3329B7B72B0135@uva.nl> Content-Transfer-Encoding: quoted-printable Thanks Wolfgang. I am experimenting with your code and there has arisen a p= roblem. The book I am typesetting has some pages before the text on page-1 = starts (cover and so on). Therefore the code
    \def\mypageref[#1]{\setpagestate[hvdm][#1]\co= lor[red]{page=3D\pagenumber\ and pageref=3D\pagestaterealpage{hvdm}{#1}}}
produces "page=3D29 and pageref=3D31". Not as int= ended. Do I change the macro \pagestaterealpage into what macro? I tried \p= agestatepage, but that wasn't the right idea.

Now what further to change?
--_000_730102E8820B4952A87B193ADBB7168Auvanl_-- --===============0366559549664139187== 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= --===============0366559549664139187==--