From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93350 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: pagereferences Date: Sun, 17 Jan 2016 19:37:02 +0100 Message-ID: <569BDF4E.2020800@gmail.com> References: <569BC47F.2010107@gmail.com> <50141C9E-4337-4197-96A8-0B679371618B@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1154416731773311592==" X-Trace: ger.gmane.org 1453055875 15237 80.91.229.3 (17 Jan 2016 18:37:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2016 18:37:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 17 19:37:44 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 1aKsCt-00018t-Is for gctc-ntg-context-518@m.gmane.org; Sun, 17 Jan 2016 19:37:43 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2961C628A; Sun, 17 Jan 2016 19:37:22 +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 UZjTK2fjzOIv; Sun, 17 Jan 2016 19:37:20 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 8010B6286; Sun, 17 Jan 2016 19:37:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C3E856286 for ; Sun, 17 Jan 2016 19:37:18 +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 Tt_AlJnZ9HF7 for ; Sun, 17 Jan 2016 19:37:17 +0100 (CET) Original-Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id C9C3F6285 for ; Sun, 17 Jan 2016 19:37:07 +0100 (CET) Original-Received: by mail-wm0-f48.google.com with SMTP id r129so26999837wmr.0 for ; Sun, 17 Jan 2016 10:37:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=9zStA553osV6c5U6cJf3Xea8Iuj1dVLIEt3AxlAzE3I=; b=X9BU75xZKWbYAN/dufQzlE5eyLzPGrxF8X+n2W5JnA9oSys7/kMnvHp0QeMJ79WgeZ /qA8IByRAjRYWeQt6ypLVshbxAwCK4RZRzv7cCHr+a3wY/v2RDu4aLmdVCci6+2OgQmb 1C0kcqn5yt+imxWEPmTbptbmXXK3LsDK4F4eQUar2YXKoCwgDPsAE0cXyGFZCNJCVpgD aMdklPHoaxKRKQuY0+pfnA6Pj0jcpfR4MmaDl8nkby4nWu0QR2ShWI9camH/IR1FQ5e3 djumUfDvarv1fMsIsYG9NWoM5VVgvzaLQv0lF1u2OgNodmnbpdDeEPJvgc+IcvjvXWQs /6UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=9zStA553osV6c5U6cJf3Xea8Iuj1dVLIEt3AxlAzE3I=; b=OKuszkz7mCMkiUndVuB3KTUirmhMAzhL59khgWiTpIto7Zlr5qHTCN6xgCDxWY92HQ sDkB9d+gY8/taxn9ZLrpCqIRqfJj0fJmHAw8NdxgjAiIkaL5CfEfXpGN/0d/zE/zynn/ MjJmVzwLun1HRPAsOr1v3eMFFr6rISRNa84vyed0ta3gchoV+GwGM7rhix2BxrqZmtIX 7DUvWhaJgsvhZU63rXSgtRfuhIBmfFzeGwdPbRw3bxWQOt+HDTonfDCZwuZrN28i0/5a TeAWtzsBBZdpJpwCepYEkvoSNPhAZfR8maI7vS8s04IuYsGVqzjPY4P0f+ZiDEDUIO0x a2pA== X-Gm-Message-State: ALoCoQkD6ObtzVXR4IgNEtVNbtUD4S1zL/uYDIrnOJeSPtJFohzc3Juq8mzf4V2N29AwHZmmYVeCuBFFvgWJFSKhmz+CioVIBg== X-Received: by 10.194.87.1 with SMTP id t1mr19937909wjz.170.1453055826210; Sun, 17 Jan 2016 10:37:06 -0800 (PST) Original-Received: from keima.localdomain (x2f29812.dyn.telefonica.de. [2.242.152.18]) by smtp.gmail.com with ESMTPSA id u12sm12168923wmu.10.2016.01.17.10.37.05 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Jan 2016 10:37:05 -0800 (PST) User-Agent: Postbox 4.0.8 (Macintosh/20151105) In-Reply-To: <50141C9E-4337-4197-96A8-0B679371618B@uva.nl> 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:93350 Archived-At: This is a multi-part message in MIME format. --===============1154416731773311592== Content-Type: multipart/alternative; boundary="------------050900000407020505030402" This is a multi-part message in MIME format. --------------050900000407020505030402 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > Meer, Hans van der > 17. Januar 2016 um 19:03 > Thanks Wolfgang. I am afraid, however, your answer inspires me to a > subsequent question. > > In order to customize the reference myself my idea is something along > the line of: > \def\myatpage[#1]{ \scratchcounter=\at[#1]\relax\ifnum=\pagenumber > etcetera. > But this gives an error, as dus \expanded{\at[#1]}, as does > \expandafter\scratchcounter= > The error is Missing number, treated as zero.. > > Do you have a hint how to proceed? \definepagestate[hans] \starttext One\setpagestate[hans][one] \page[+2] Two\setpagestate[hans][two] Three\setpagestate[hans][three] \blank \ifnum0\pagestaterealpage{hans}{two}=0\pagestaterealpage{hans}{one} The references are on the same page. \else The references are on different pages. \fi \blank \ifnum0\pagestaterealpage{hans}{two}=0\pagestaterealpage{hans}{three} The references are on the same page. \else The references are on different pages. \fi \stoptext Wolfgang --------------050900000407020505030402 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
17= .=20 Januar 2016 um 19:03
Thanks Wolfgang. I am afraid, however, your answer inspires me to a=20 subsequent question.

In order to customize =C2=A0the reference myself my idea = is=20 something along the line of:
=C2=A0 \def\myatpage[#1]{=20 \scratchcounter=3D\at[#1]\relax\ifnum=3D\pagenumber etcetera.=C2=A0
But this gives an error, as dus \expanded{\at[#1]}, as=20 does \expandafter\scratchcounter=3D
The error is Missing number, treated as zero..

Do you have a hint how to proceed?
\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}
=C2=A0=C2=A0=C2=A0 The references are on the same page.
\else
=C2=A0=C2=A0=C2=A0 The references are on different pages.=C2=A0=C2=A0=C2=A0=
\fi

\blank

\ifnum0\pagestaterealpage{hans}{two}=3D0\pagestaterealpage{hans}{three} =C2=A0=C2=A0=C2=A0 The references are on the same page.
\else
=C2=A0=C2=A0=C2=A0 The references are on different pages.=C2=A0=C2=A0=C2=A0=
\fi

\stoptext

Wolfgang
--------------050900000407020505030402-- --===============1154416731773311592== 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= --===============1154416731773311592==--