From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85371 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?G=C3=A9ry_Ogam?= Newsgroups: gmane.comp.tex.context Subject: Re: Numberconversion problem in caption prefixes Date: Thu, 21 Nov 2013 21:01:07 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0968595010==" X-Trace: ger.gmane.org 1385064082 26431 80.91.229.3 (21 Nov 2013 20:01:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Nov 2013 20:01:22 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 21 21:01:27 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VjaRF-0005tA-L0 for gctc-ntg-context-518@m.gmane.org; Thu, 21 Nov 2013 21:01:21 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A2D0D101E3; Thu, 21 Nov 2013 21:01:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xkDxiv9hdI4n; Thu, 21 Nov 2013 21:01:17 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9652B101F6; Thu, 21 Nov 2013 21:01:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C3726101F6 for ; Thu, 21 Nov 2013 21:01:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z7f2O8bCyZGE for ; Thu, 21 Nov 2013 21:01:10 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 6BBCC101E3 for ; Thu, 21 Nov 2013 21:01:08 +0100 (CET) Original-Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com [IPv6:2a00:1450:400c:c00::232]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rALK18qO026327 for ; Thu, 21 Nov 2013 21:01:08 +0100 Original-Received: by mail-wg0-f50.google.com with SMTP id k14so237958wgh.29 for ; Thu, 21 Nov 2013 12:01:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=qFhu/hGSWdL9l/kmnTVMJXNJtdO/WYdoiUSELLQejj8=; b=peC4OcJL+szUmODPUZjyGSAthHUNSmGyDD6hEnixmXvaOyAi5b2NVOoKAZxlyqXVn0 M2Hr6Qbr1KeeVynwmWlA3Gv4SGP8ZArEXNt2CUNkMfpb+aR5/QgJEPcZbBWpeaehxBE5 wVDT7cGxprNhg5PgPAoxGzLb4BIZtlIa2kpvrkPZ6ATZRjyEsb20gRi0VzxpsBRYQ5ER YfOV93QdUH+iBKJAs9bDIGxwMXjkMAdnC3sU+yw/XRWAOVmD8YKfXxMGnJQoQuKKKXL4 ivfo86zOZsbqWLZ1NSDKcac6MtoL2SVMYU+qzGz2IcAFDC40fab+E8ET0+nu2qdnurKq EQ6A== X-Received: by 10.194.219.1 with SMTP id pk1mr6978569wjc.36.1385064067992; Thu, 21 Nov 2013 12:01:07 -0800 (PST) Original-Received: by 10.216.244.4 with HTTP; Thu, 21 Nov 2013 12:01:07 -0800 (PST) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::232; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03KQk186H - 5eedd185cec8 - 20131121 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:85371 Archived-At: --===============0968595010== Content-Type: multipart/alternative; boundary=001a11c1a2f0c3956a04ebb55bb9 --001a11c1a2f0c3956a04ebb55bb9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you Wolfgang, it does what I want. However, I realised after trying the following code inside environments (frontmatter, bodymatter, backmatter and appendices) that the default behaviour is WRONG because the conversions of prefixes are not always automatic. For instance, in the appendix environment, by default chapter numbers are Characters and every prefix representing a chapter number is also a Character (section prefixes, caption prefixes and so on). Now if you decide to switch chapter numbers to Romannumerals, you will get something totally inconsistent if you don=E2=80=99t do many conversions manually: *\startsectionblockenvironment[appendix]* * \defineconversionset[romannumeralsconversionset][][R]* * \setuphead[chapter][sectionconversionset=3Dromannumeralsconversionset]= * *\stopsectionblockenvironment* *\starttext* *\startappendices* *\chapter{Cool}* *\placefigure{A cow}{\externalfigure[cow]}* *\chapter{Cat}* *\section{Mouse}* *\section{Dog}* *\placefigure{A cow}{\externalfigure[cow]}* *\stopappendices* *\stoptext* which gives: *I Cool* *[figure] Figure I.I Cow % <-- Here the prefix conversion from 'A' to 'I' works.* *II Cat* *B.1 Mouse % <-- Here the prefix conversion from 'B' to 'II' does NOT work.* *B.2 Dog % <-- Here the prefix conversion from 'B' to 'II' does NOT work.* *[figure] Figure B.II Cow % <-- Here the prefix conversion from 'B' to 'II' does NOT work (because of the presence of the 2 sections B.1 and B.2 where the prefix conversion already did not work I think, so here is the BUG).* Extra: is it normal that caption NUMBERS (not prefixes) are converted to Romannumerals by default INSIDE the appendix environment (outside they are usual numbers)? ('Figure I.I Cow' and 'Figure B.II Cow' instead of 'Figure A.1 Cow' and 'Figure B.2 Cow'.) --001a11c1a2f0c3956a04ebb55bb9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you Wolfgang, it does what I want.

However, I realised after trying the following code inside environments (= frontmatter, bodymatter, backmatter and appendices) that the default behavi= our is WRONG because the conversions of prefixes are not always automatic.<= /div>

For instance, in the appendix environment, by default c= hapter numbers are Characters and every prefix representing a chapter numbe= r is also a Character (section prefixes, caption prefixes and so on). Now i= f you decide to switch chapter numbers to Romannumerals, you will get somet= hing totally inconsistent if you don=E2=80=99t do many conversions manually= :


\startsectionblockenvironment[ap= pendix]
=C2=A0 =C2=A0 \defineconversionset[romannumeralsco= nversionset][][R]
=C2=A0 =C2=A0 \setuphead[chapter][sectio= nconversionset=3Dromannumeralsconversionset]
\stopsectionblockenvironment

<= div>\starttext

\startappendi= ces
\chapter{Cool}
\placefigure{A cow}{\e= xternalfigure[cow]}
\chapter{Cat}
\section{Mouse}
\se= ction{Dog}
\placefigure{A cow}{\externalfigure[cow]}

\stopappendices
\stoptext


whi= ch gives:


I Cool
[figure] = Figure I.I Cow =C2=A0 =C2=A0 % <-- Here the prefix conversion from '= A' to 'I' works.

II Cat
B.1 Mouse =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 % <-- Here t= he prefix conversion from 'B' to 'II' does NOT work.
B.2 Dog =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 % <-- Here the=C2=A0prefix=C2=A0conversion f= rom 'B' to 'II' does NOT work.
[figure] Figure B.II Cow =C2=A0 % <-- Here the=C2=A0prefix=C2=A0= conversion from 'B' to 'II' does NOT work (because of the p= resence of the 2 sections B.1 and B.2 where the prefix conversion already d= id not work I think, so here is the BUG).


Extra: is it normal that caption NUMBERS= (not prefixes) are converted to Romannumerals by default INSIDE the append= ix environment (outside they are usual numbers)? ('Figure I.I Cow' = and 'Figure B.II Cow' instead of 'Figure A.1 Cow' and '= Figure B.2 Cow'.)
--001a11c1a2f0c3956a04ebb55bb9-- --===============0968595010== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0968595010==--