From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109378 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: "page i/n" in footer Date: Sun, 8 Nov 2020 12:32:00 +0100 Message-ID: <86f35461-886e-8dd3-d0c0-bb1fec68b40f@gmail.com> References: <6be9508b-4693-ee0c-1f0b-518faf8a56d0@gmx.es> <1e0365e9-4447-9553-f90b-0894b429b89d@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0326093209397097852==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25952"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.36 Cc: mailing list for ConTeXt users To: Sylvain Hubert Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 08 12:32:20 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbivj-0006dd-M1 for gctc-ntg-context-518@m.gmane-mx.org; Sun, 08 Nov 2020 12:32:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CE3CC1AA33D; Sun, 8 Nov 2020 12:32:05 +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 3nkPPaVLx-S8; Sun, 8 Nov 2020 12:32:04 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DC4FC1AA36D; Sun, 8 Nov 2020 12:32:04 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3835A1AA33D for ; Sun, 8 Nov 2020 12:32:04 +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 ufkpUqZBPDWw for ; Sun, 8 Nov 2020 12:32:03 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.48; helo=mail-ej1-f48.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Original-Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 6B5D11AA335 for ; Sun, 8 Nov 2020 12:32:03 +0100 (CET) Original-Received: by mail-ej1-f48.google.com with SMTP id k3so8200799ejj.10 for ; Sun, 08 Nov 2020 03:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=9b7FCH/ZuNvZdYdbH42ihQd4ZcuSbIvZumscm06fdDg=; b=s+N3Y8ZeVPJMRBAxeturwEAprPnmYvOBpamtkUp6P+ZjhXN91ihHAMHzDN664pOPKk Q855keTfMPwdC0i+QnCa38nWQxc6kbJL5a5SHf47n1Q7ouTm6KYL/OMUSN8cls1uQZc4 oXN+B0J95cP62UNqY6nxdPAqI2xZB68xI5IxlN945Cn68af7XueYYNRPp1yR6dZXqcF1 91fmr+0l3af502oDU3pUs3KiNDbzb3L7krXA3NPnIf0sf60mqEz8695iFy9NYlhxkCwd oNRwZEGY74e7Ru5OIlwcOoG47vc86dIfSmgxP3bQngMBBHczaOvzeuBi08ZMSDKAjcNh bPyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=9b7FCH/ZuNvZdYdbH42ihQd4ZcuSbIvZumscm06fdDg=; b=ksqevNMCjB3KkooJkRxcqMBDG7ixnmtBSNR6HkefDa9D4kBWSckJziJwKIps+WXRC7 otnx3AYCqkxdw/U9Tf5CThgo6oajKWdBde7PMT5KVX++ZE37djZnRP3H63sGAjLe1fGb M28yipo3i9bKjQeJ4u5zmiDWiFKsCJpUD0x+TIs5Ynhgt8uqmWdOoYsFXoq/Li02fewk C6mJityUMc923BCaGwFv+ksu/BqE3P6TBgye12ekFRTcmi8wOX+xWnYd1k+kHbUhSp42 Cxm7cOPsesjKl/CJX+XlOfdQFHf+QzrZ34bq77xfpadB17gq2gXjJJuoZCUrsS61Fa3f 8nhQ== X-Gm-Message-State: AOAM530U0hl03uSCY6ZURn0syY9UT8KQtDmAujesKwCZFPRoq4BE79uH PZu4E233UixCaJD90xXVcwndkSNAkp4= X-Google-Smtp-Source: ABdhPJxgxjspFSdgnl5tPrtxqzBgI09dhMkpU9hxShj1gRYdrypuVBfGyGej5Y4r0aEMzI2XnTxZZg== X-Received: by 2002:a17:906:d28b:: with SMTP id ay11mr10719404ejb.164.1604835122918; Sun, 08 Nov 2020 03:32:02 -0800 (PST) Original-Received: from [192.168.1.4] (dynamic-095-118-060-109.95.118.pool.telefonica.de. [95.118.60.109]) by smtp.gmail.com with ESMTPSA id a10sm5653677edu.78.2020.11.08.03.32.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Nov 2020 03:32:02 -0800 (PST) In-Reply-To: Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:109378 Archived-At: This is a multi-part message in MIME format. --===============0326093209397097852== Content-Type: multipart/alternative; boundary="------------668B54561975D7CD3E2323B0" Content-Language: en-US This is a multi-part message in MIME format. --------------668B54561975D7CD3E2323B0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sylvain Hubert schrieb am 08.11.2020 um 12:19: > On Sun, 8 Nov 2020 at 12:07, Wolfgang Schuster > > wrote: > > Sylvain Hubert schrieb am 08.11.2020 um 11:48: > > On Sun, 8 Nov 2020 at 10:31, Pablo Rodriguez > > >> wrote: > > > >     Hi Sylvain, > > > >        \setupfootertexts[\pagenumber/\lastpagenumber] > >        \starttext > >        \dorecurse{25}{\null\page} > >        \stoptext > > > > > > Indeed, \setupfooterexts is much clearer for page numbering. > Thanks for > > the help!. > > > > Btw, do you know whether there is any difference between > \lastpagenumber > > and \lastuserpagenumber mentioned both by Wolfgang and by the > excursion > > book ? > > \defineconversionset [bodypart:pagenumber] [] [Romannumerals] > > \startsetups [footer] >      \starttabulate[|l|c|c|] >      \NC \bf Command          \NC \bf Current page \NC \bf Last page >    \NC\NR >      \NC \tex{pagenumber}     \NC \pagenumber      \NC > \lastpagenumber >    \NC\NR >      \NC \tex{userpagenumber} \NC \userpagenumber  \NC > \lastuserpagenumber \NC\NR >      \stoptabulate > \stopsetups > > \setupfootertexts[\directsetup{footer}] > > \starttext > > \dorecurse{10}{\dontleavehmode\page} > \stoptext > > > Thanks, so basically \(last-)userpagenumber is a configurable > descendent  of \(last-)pagenumber if I've got the right message from > this example? \pagenumber and \lastpagenumber are the raw values which can be used to calculate the difference between both etc. while \userpagenumber and \lastuserpagenumber are the formatted result of these values. The latter are needed when you apply a conversion to the page number (e.g. roman numberals in the frontmatter). Wolfgang --------------668B54561975D7CD3E2323B0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Sylvain Hubert schrieb am 08.11.2020 um 12:19:
On Sun, 8 Nov 2020 at 12:07, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
Sylvain Hubert schrieb am 08.11.2020 um 11:48:
> On Sun, 8 Nov 2020 at 10:31, Pablo Rodriguez <oinos@gmx.es
> <mailto:oinos@gmx.es>> wrote:
>
>     Hi Sylvain,
>
>        \setupfootertexts[\pagenumber/\lastpagenumber]
>        \starttext
>        \dorecurse{25}{\null\page}
>        \stoptext
>
>
> Indeed, \setupfooterexts is much clearer for page numbering. Thanks for
> the help!.
>
> Btw, do you know whether there is any difference between \lastpagenumber
> and \lastuserpagenumber mentioned both by Wolfgang and by the excursion
> book <http://www.pragma-ade.com/general/manuals/ma-cb-en.pdf>?

\defineconversionset [bodypart:pagenumber] [] [Romannumerals]

\startsetups [footer]
     \starttabulate[|l|c|c|]
     \NC \bf Command          \NC \bf Current page \NC \bf Last page
   \NC\NR
     \NC \tex{pagenumber}     \NC \pagenumber      \NC \lastpagenumber
   \NC\NR
     \NC \tex{userpagenumber} \NC \userpagenumber  \NC
\lastuserpagenumber \NC\NR
     \stoptabulate
\stopsetups

\setupfootertexts[\directsetup{footer}]

\starttext
\dorecurse{10}{\dontleavehmode\page}
\stoptext

Thanks, so basically \(last-)userpagenumber is a configurable descendent  of \(last-)pagenumber if I've got the right message from this example?

\pagenumber and \lastpagenumber are the raw values which can be used to calculate
the difference between both etc. while \userpagenumber and \lastuserpagenumber
are the formatted result of these values. The latter are needed when you apply
a conversion to the page number (e.g. roman numberals in the frontmatter).

Wolfgang

--------------668B54561975D7CD3E2323B0-- --===============0326093209397097852== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============0326093209397097852==--