From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108588 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jan Willem Flamma Newsgroups: gmane.comp.tex.context Subject: Re: \setupuserpagenumber not working as expected Date: Thu, 3 Sep 2020 10:29:38 +0200 Message-ID: <806CD640-CF48-4D9D-ABB9-43C563957990@hxcore.ol> References: <4c941864-8f83-082c-7b10-29509bacebc5@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3798702229278722849==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8535"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 03 10:30:17 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 1kDkdM-00026l-Rp for gctc-ntg-context-518@m.gmane-mx.org; Thu, 03 Sep 2020 10:30:16 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6F2711A89A3; Thu, 3 Sep 2020 10:29:43 +0200 (CEST) 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 SD6yRhDn1blA; Thu, 3 Sep 2020 10:29:42 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8046D1A89A5; Thu, 3 Sep 2020 10:29:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6F45A1A899C for ; Thu, 3 Sep 2020 10:29:41 +0200 (CEST) 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 0WOZRXaCrScW for ; Thu, 3 Sep 2020 10:29:39 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.53; helo=mail-ed1-f53.google.com; envelope-from=register12c@gmail.com; receiver= Original-Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 CC8351A897E for ; Thu, 3 Sep 2020 10:29:39 +0200 (CEST) Original-Received: by mail-ed1-f53.google.com with SMTP id c8so1794369edv.5 for ; Thu, 03 Sep 2020 01:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:date:from:subject:thread-topic:in-reply-to:message-id :references:to:content-transfer-encoding; bh=DpDuH5tktV4N+8RFZvQ+eeGSqbGrUoFlGgDUlAukn0M=; b=LcXg6cIZVCFmPZBoONCB1IIUxEAWg+/8+SSskWgxxNGku5DAPQl7lo/qEj7fT+QGcX mNqGJw38Ntq1Zh1spoBERE7c1P8o5M+48ZcmqLRtLNdy0L2PGjZPgtdBBQzKG/nFfvXF KolupdFBxd+uhrIVCfXjP7vyxUwrCzOAc3tgRyG/N1WEJDOHnY5HWS16KdGijX9gdD55 0a4VV6anjkN/qP0i3ipvEOxXaHExweavfT4TgS36vVz+bAdm++naOPC2jWdhtclpXACJ YHV1Z53jSmg/FGfL+CZsUfvi8CEGqjB273mFJnoanr82zdiPP+A7JQmp7WruAhZijLpr 5Yxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:from:subject:thread-topic :in-reply-to:message-id:references:to:content-transfer-encoding; bh=DpDuH5tktV4N+8RFZvQ+eeGSqbGrUoFlGgDUlAukn0M=; b=FdSQX5Hzop6/ezN5r6HBmwrTqnKN+XXiQ6CXuNCeoYIyX0APdYv1DicE61lrj9N1MJ Yjrr4CieRcA7+F0wjrIupBSmDQzVztPSqATFzZ3XhgVu9yWPp12CEXVypaXBlFl4yJkL jk8n7o2chm4pJNFfrwDMe31PiPS8SflcvsOSIFXVJM/tHnRbJtlpJPgfPiyFuew7RBoE vyOugYE9I8dtrHgF2k8uz0Im/P1OSiHxusLjefo1eFlIo78kOBHbKo31TZ3gbdlE+kBj VY4N05nFWTHcI+OCKJuRSRsNN9edOjjm3xEHmCqaApUhYZaadkpuMPVbwFs6Af8ZLiou znhQ== X-Gm-Message-State: AOAM530xefsG9R3SUkNLAR2OLxkt4F4Y6Y/1GBp24g4x7FwdRuDz0vek 8O0P6Qsaem1uBd6MUdX2+GGkHgZ5oj6Kvw== X-Google-Smtp-Source: ABdhPJxuDMgBdP2abaxewT7P33hCR9mP45cxi0/b0H+o9/v29yq84Rd1BAShy4uwn+GyZWZAxtCR2g== X-Received: by 2002:aa7:d585:: with SMTP id r5mr1939714edq.278.1599121779078; Thu, 03 Sep 2020 01:29:39 -0700 (PDT) Original-Received: from smtp.gmail.com ([2001:984:3852:1:30cf:938:dc32:f838]) by smtp.gmail.com with ESMTPSA id h18sm2346277edw.56.2020.09.03.01.29.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2020 01:29:38 -0700 (PDT) Thread-Topic: RE: [NTG-context] \setupuserpagenumber not working as expected In-Reply-To: <4c941864-8f83-082c-7b10-29509bacebc5@gmail.com> 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:108588 Archived-At: --===============3798702229278722849== Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Dear Julian,

 

I use something similar using a main product f= ile, an environment file that contain the styling and several components th= at build up the frontmatter, the manual and the appendices.

 = ;

Below my setup where I start the roman numbering on the table of contents = page (page 5 or v in roman)

Once the bodymatter starts the pagenumber = is set=C2=A0 to the arabic 1 (see below in the main product file)

=  

You should be able to copy and adapt to your needs.=

 

Ki= nd regards,

Jan Willem Flamma

 

 <= /p>

 

= The main product file

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

\environment env-WA

 

= \startproduct currentproduct

=  

% Document definitions

\define\MyManual{Course Manual}=

\defin= e\MyTitle{Title}

\define\MySubtitleOne{Subtitle 1}

\define\MySubtit= leTwo{Subtitle 2}

\define\MyRevnumber{Revision number}

 <= /o:p>

%= Load frontmatter files

\startfrontmatter

=C2=A0=C2=A0=C2=A0 \compo= nent fm-frontpage

=C2=A0=C2=A0=C2=A0 \component fm-titlepage=

=C2=A0= =C2=A0=C2=A0 \component fm-tableofcontents

\stopfrontmatter<= /span>

&n= bsp;

% Load bodymatter file

\startbodymatter

\setupbackgrounds<= /o:p>

= =C2=A0=C2=A0=C2=A0 [leftpage]

=C2=A0=C2=A0=C2=A0 [setups=3Dpagenumber:l= eft]

\setupbackgrounds

=C2=A0=C2=A0=C2=A0 [rightpage]

=C2=A0=C2= =A0=C2=A0 [setups=3Dpagenumber:right]

\setuppagenumber[number=3D1]=

= =C2=A0=C2=A0=C2=A0 \component co-01

=C2=A0=C2=A0=C2=A0 \component co-02=

\stopbodymatter

 

= % Load backmatter files

\startback= matter

\setupbackgrounds

=C2=A0=C2=A0 [leftpage]<= /p>

=C2=A0=C2=A0 [= setups=3Dpagenumber:left]

\setupbackgrounds

=C2=A0=C2=A0 [rightpage= ]

=C2=A0=C2=A0 [setups=3Dpagenumber:right]

\startappendices

=C2= =A0=C2=A0 \component co-ap-01

=C2=A0=C2=A0 \component co-ap-02

\sto= pappendices

\stopbackmatter

<= span class=3DDefaultFontHxMailStyle> 

% Load external PDF document= s

\setuppagenumber[state=3Dstop]

\copypages[External PDF/app1.pdf][= n=3D4]

 

\stopproduct

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D

 

 

 

The env-WA.tex file (below is a= bout pagenumbering only)

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

% Start chapter on right (odd) page, pagenumber =3D bottom right

\set= uppagenumbering

=C2=A0=C2=A0=C2=A0 [alternative=3Ddoublesided,=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0location=3Dr= ight]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0

<= p class=3DMsoNormal> <= /span>

% Pagen= umbering style

\definestructureconversionset

=C2=A0=C2=A0=C2=A0 [fr= ontpart:pagenumber][][romannumerals]

\definestructureconversionset=

= =C2=A0=C2=A0=C2=A0 [bodypart:pagenumber] [][numbers]

<= p class=3DMsoNormal>\definestructureco= nversionset

=C2=A0=C2=A0=C2=A0 [appendix:pagenumber] [][numbers]

= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

 

 

&nbs= p;

The fm-frontpage.tex file

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

\startcomponent currentcomponent

 

\product product<= /o:p>

<= o:p> 

% Front page layout

\startstandardmakeup

 

% Pla= ce logo centered on page

\framed[height=3D5cm,width=3Dbroad,frame=3Dof= f]

{\externalfigure[frontpage-logo.png][width=3D12cm]}

 =

= % Place course titles

\blank[6*big]

\color[Modu_Blue]{\midaligned{\= bfc \MyManual}}

 

\blank[4*big]

\color[Modu_Blue]{\midali= gned{\tfc \MyTitle}}

 

= \blank[2*big]

\color[Modu_Blue]{\m= idaligned{\tfc \MySubtitleOne}}

<= span class=3DDefaultFontHxMailStyle> 

\blank[2*big]

\color[Mod= u_Blue]{\midaligned{\tfc \MySubtitleTwo}}

 

<= p class=3DMsoNormal>\vfill<= /span>

&n= bsp;

\stopstandardmakeup

 

\stopcomponent

=

=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D

 

=  

 <= /p>

The fm-titl= epage.tex file

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

\startcompo= nent currentcomponent

 

= \product product

=

 =

\start= standardmakeup

 

=C2=A0=C2=A0=C2=A0 \color[Modu_Blue]{\midalig= ned{\tfb \MyManual}}

=C2=A0=C2=A0=C2=A0 \blank[2*big]

=C2=A0=C2=A0= =C2=A0 \color[Modu_Blue]{\midaligned{\tfb \MyTitle}}

<= p class=3DMsoNormal>=C2=A0=C2=A0=C2=A0= \blank[2*big]

=C2=A0=C2=A0=C2=A0 \color[Modu_Blue]{\midaligned{\tfb \M= ySubtitleOne}}

=C2=A0=C2=A0=C2=A0 \blank[2*big]

=C2=A0=C2=A0=C2=A0 = \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}}

 

=C2=A0= =C2=A0=C2=A0 \blank[10*big]

 

=C2=A0=C2=A0=C2=A0 \color[Modu_B= lue]{\midaligned{\tfb \MyRevnumber}}

=C2=A0=C2=A0=C2=A0 \blank

=C2= =A0=C2=A0=C2=A0 \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]= }}

 

=C2=A0=C2=A0=C2=A0 \blank[10*big]

 

=C2=A0= =C2=A0=C2=A0 \midaligned{\color[Modu_Blue]{\tfb Written by:}}

=C2=A0=C2= =A0=C2=A0 \blank

=C2=A0=C2=A0=C2=A0 \midaligned{\color[Modu_Blue]{\tfb = Company name}}

=C2=A0=C2=A0=C2=A0 \blank

=C2=A0=C2=A0=C2=A0 \midal= igned{\color[Modu_Blue]{\tfb City, Country}}

 <= /p>

=C2=A0=C2=A0= =C2=A0 \vfill

 

\stopstandardmakeup

 

\stopcompon= ent

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

 <= /p>

The fm-tabl= eofcontents.tex file

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

\star= tcomponent currentcomponent

 

\product product

 =

= \setupbackgrounds

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 [leftpage]

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 [setups=3Dpagenumber:left]

\setupbackgrounds

=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [rightpage]<= /span>

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [setups=3Dpagenumber= :right]

 

% This is where I want the roman numbering to start<= o:p>

\setuppagenumber[number=3D5]

=  

\starttitle[title=3DTable= of Contents]

\placecontent

\stoptitle=

 

\stopcomponent

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

 

 

From: jbf
Sent: Thursday, 3 Septe= mber 2020 06:05
To: mailing= list for ConTeXt users
Subject: [NTG-context] \setupuserpage= number not working as expected

 

Am seeking to have fr= ontmatter pages in roman numerals and from Chapter 1 onwards in arabic nume= rals. I have achieved something of the kind, but page 1 (arabic) is appeari= ng on the last page of the frontmatter and not the first page of Chapter 1.= I do not know why this is happening. My setup for page numbering is as fol= lows (something I found somewhere - wiki? elsewhere? Not sure. I didn't mak= e it up!):

\definestructureconversionset[frontpart:pagenumber][][roma= nnumerals]
\definestructureconversionset[bodypart:pagenumber] [][numbers= ]
\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numbe= rconversion=3Dromannumerals]
\setuplist[chapter][pageconversionset=3Dpag= enumber]
\setuppagenumber[number=3D1]
\stopsectionblockenvironment
\startsectionblockenvironment[bodypart]
\setuppagenumber[number=3D1= ]
\stopsectionblockenvironment

The frontmatter is some 16 pages wo= rth (ends on a verso page but that verso carries the arabic number 1 instea= d of page xvi which it should be, since the final paragraph on that page en= ds with \stopfrontmatter. That means Chapter 1 (immediately after \startbod= ymatter) is now page 2 instead of page 1!

I tried a slightly simpler = version of the above which I found on Stackexchange:

\definestructureconversionset [frontpart:pagenumber] <= span style=3D'font-size:10.0pt;font-family:"inherit",serif;color:#9F393D;bo= rder:none windowtext 1.0pt;padding:0cm'>[]<= span style=3D'font-size:10.0pt;font-family:"inherit",serif;border:none wind= owtext 1.0pt;padding:0cm'> [romannumerals]

\startsec= tionblockenvironment [bodypart] <= /o:p>

=C2=A0=C2=A0\set=
counter [u=
serpage] [1]
\stopsectionblockenvironment

b= ut it gave me the same result. Any idea how I can get the correct result?

Julian

 

= --===============3798702229278722849== 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== --===============3798702229278722849==--