From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/85381 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Numberconversion problem in caption prefixes Date: Fri, 22 Nov 2013 06:56:25 +0100 Message-ID: <57EDD1A7-12CB-46F6-81CF-10CB073E2DC9@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Content-Type: multipart/mixed; boundary="===============0273371723==" X-Trace: ger.gmane.org 1385099788 5891 80.91.229.3 (22 Nov 2013 05:56:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Nov 2013 05:56:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 22 06:56:35 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 1VjjjG-0002ma-UE for gctc-ntg-context-518@m.gmane.org; Fri, 22 Nov 2013 06:56:35 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E4F7D10234; Fri, 22 Nov 2013 06:56:33 +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 gYiU8kUnG95r; Fri, 22 Nov 2013 06:56:32 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id ED33C101FA; Fri, 22 Nov 2013 06:56:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4CE24101FA for ; Fri, 22 Nov 2013 06:56:30 +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 s++PIB8vJaZ6 for ; Fri, 22 Nov 2013 06:56:29 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 6E390101F7 for ; Fri, 22 Nov 2013 06:56:29 +0100 (CET) Original-Received: from mail-bk0-x234.google.com (mail-bk0-x234.google.com [IPv6:2a00:1450:4008:c01::234]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id rAM641tB014447 for ; Fri, 22 Nov 2013 07:04:01 +0100 Original-Received: by mail-bk0-f52.google.com with SMTP id u14so630428bkz.39 for ; Thu, 21 Nov 2013 21:56:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=w+vb2ZHOyqIEScKXWFhq4ATl6DGY0tfl43McuiqHD+M=; b=blRmdSJU3x0IGnUfzNaDmcDCMLQUtR1WxMS4cn1Pr/V5D17UMdEpP58FahpXA7b3WQ aVpLI1srBzPVZNzTUbIYjh9tvAROLSKey1OUFNCO6VX2AFNxgJeDWBjNL4k5stxE1S6W xIPBftK36PKQnRtGkv1X2m1bOmP7pvc4BKzAC9efipNkJAW1HX+IFbjmCjhfl/MGLElk kfgVetCYvi2/+3vfJQ0FTRHsEXh0vW3qGXl07D18/PLTEU6bnHGSSsIIZEP5uxlAHboz WoE7K9JqPbMFtH27oIPNTf/JiDCcQpX1op8hrDcwifBanbViKG9IHeEmNixzMi3wTrd0 Khnw== X-Received: by 10.204.203.12 with SMTP id fg12mr6009538bkb.31.1385099788542; Thu, 21 Nov 2013 21:56:28 -0800 (PST) Original-Received: from keima.localdomain (x2f237ee.dyn.telefonica.de. [2.242.55.238]) by mx.google.com with ESMTPSA id l5sm30596030bko.7.2013.11.21.21.56.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Nov 2013 21:56:26 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1822) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4008:c01::234; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01KQu41BO - a4ab72f3060a - 20131122 (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:85381 Archived-At: --===============0273371723== Content-Type: multipart/alternative; boundary="Apple-Mail=_B1F423BA-B6AB-411F-B775-16F18D736B12" --Apple-Mail=_B1F423BA-B6AB-411F-B775-16F18D736B12 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 21.11.2013 um 21:01 schrieb G=E9ry Ogam : > Thank you Wolfgang, it does what I want. >=20 > 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. >=20 > 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=92t do many conversions = manually: >=20 >=20 > \startsectionblockenvironment[appendix] > \defineconversionset[romannumeralsconversionset][][R] > = \setuphead[chapter][sectionconversionset=3Dromannumeralsconversionset] > \stopsectionblockenvironment >=20 > \starttext >=20 > \startappendices > \chapter{Cool} > \placefigure{A cow}{\externalfigure[cow]} > \chapter{Cat} > \section{Mouse} > \section{Dog} > \placefigure{A cow}{\externalfigure[cow]} >=20 > \stopappendices >=20 > \stoptext \defineconversionset [appendix:headconversionset] [n,R] [n] \defineconversionset [appendix:floatconversionset] [] [n] \setuphead[sectionconversionset=3Dheadconversionset] \setupcaption[numberconversionset=3Dfloatconversionset] \starttext \startappendices \chapter{Cool} \placefigure{A cow}{\externalfigure[cow]} \chapter{Cat} \section{Mouse} \section{Dog} \placefigure{A cow}{\externalfigure[cow]} \stopappendices \stoptext Wolfgang --Apple-Mail=_B1F423BA-B6AB-411F-B775-16F18D736B12 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Am 21.11.2013 um 21:01 schrieb G=E9ry = Ogam <maggyero@gmail.com>:

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=92t = do many conversions manually:
=


\startsectionblockenvironment[a= ppendix]
    = \defineconversionset[romannumeralsconversionset][][R]
&nb= sp;   = \setuphead[chapter][sectionconversionset=3Dromannumeralsconversionset]=
=
\stopsectionblockenvironment

=
\starttext

\startappen= dices
\chapter{Cool}
\placefigure{A = cow}{\externalfigure[cow]}
=
\chapter{Cat}
\section{Mouse}
\s= ection{Dog}
\placefigure{A = cow}{\externalfigure[cow]}

\stopapp= endices

=
\stoptext

\defineconversionset [appendix:headconversionset]  [n,R] = [n]
\defineconversionset [appendix:floatconversionset] [] =   =  [n]

\setuphead[sectionconversionset=3Dheadc= onversionset]

\setupcaption[numberconversionset=3D= floatconversionset]

\starttext

\startappendices
\chapter{Cool}
\placefigure{A = cow}{\externalfigure[cow]}
\chapter{Cat}
\section{Mous= e}
\section{Dog}
\placefigure{A = cow}{\externalfigure[cow]}
\stopappendices

<= div>\stoptext

Wolfgang

= --Apple-Mail=_B1F423BA-B6AB-411F-B775-16F18D736B12-- --===============0273371723== 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 ___________________________________________________________________________________ --===============0273371723==--