From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93366 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: RTL problem with figure numbers Date: Mon, 18 Jan 2016 01:01:55 -0500 Message-ID: References: <569132A9.8020600@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0115990426779634455==" X-Trace: ger.gmane.org 1453096960 6231 80.91.229.3 (18 Jan 2016 06:02:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2016 06:02:40 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 18 07:02:29 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 1aL2tZ-0000ce-Hu for gctc-ntg-context-518@m.gmane.org; Mon, 18 Jan 2016 07:02:29 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6FA0F60F3; Mon, 18 Jan 2016 07:02:10 +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 R69ipGOavbFg; Mon, 18 Jan 2016 07:02:09 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id AA74B60F9; Mon, 18 Jan 2016 07:02:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9D17960F5 for ; Mon, 18 Jan 2016 07:02:08 +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 OKQI1ZjZoI_c for ; Mon, 18 Jan 2016 07:02:07 +0100 (CET) Original-Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) (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 4AE3860F3 for ; Mon, 18 Jan 2016 07:01:57 +0100 (CET) Original-Received: by mail-ob0-f180.google.com with SMTP id vt7so154537740obb.1 for ; Sun, 17 Jan 2016 22:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=KRkLlMaZkc7fMEJlAZJ/sjwliiT8znt8Yk0/ak2cV6A=; b=QBShyoRAWXIbul8U7DW6NLUF1T1nyRUWcGPWULSOjkoKvhJ8iz2S6JhKNdCIlK/CQi nEC7IOjchxx40/1kzWqAsecm2PtfcZKhprl+RjUPs65TOcAZtyQIzehxcm0Rm5etYDQd EmwtfKcc5sNGqftueF7OhEobIclqqDcusVIcp12T386BiyCmF2RupBi8+hoBRYZS3FjT l6LqCh8usk0CgWM63rKS155PhYpGQrZ22Ds5JDMDVa7GJ/SPycBWXvowllqacD/J3OsL vNX8vNAYK0IDlDRmzMUw1Y9WKbOu3Hcqf/yKmfWrvYtFt+0UmQgFQkkm3qwc66nPp+/J pdaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=KRkLlMaZkc7fMEJlAZJ/sjwliiT8znt8Yk0/ak2cV6A=; b=cEHpS2TADJNRgEh/hQKCTncIeI2uMKdunnPOW7QpyJAMwUfY7jHQnH04+8vorg7HVm HXJazBNQKsTNeD2wlKwIRZoF8gEIwC51vhW0L9qmKYs7zkQQF3rh++nXvaHbT0/tsktU 7FKRQaq7zO2JeVRurbPbQMFMX3oS2mgFlKvSZUqo4KAoCtG6EGiT2izogU9vRrUOO4IP xyuDtZc2hgpgo2yCnmhON692SodJm/5jsOt1JpqfwQ6Rse5MrMZahbF1FptLenZUdEMk QZ6OOTr2GaERpj8KRJ2BTUS4ooqETmtW0it2l9b+OH3uL9aimBGV1232TkGwUoJBu7fI ExKA== X-Gm-Message-State: ALoCoQn8dse0icDqSdlwBeCysJj9k4t0RK1W2+juUo0CgfbMuXSGbwDjjN1kyRTPnXg5byscf5ply+irHjsEnUvpFm9kIXEVDA== X-Received: by 10.182.144.133 with SMTP id sm5mr18537472obb.69.1453096915356; Sun, 17 Jan 2016 22:01:55 -0800 (PST) Original-Received: by 10.202.188.132 with HTTP; Sun, 17 Jan 2016 22:01:55 -0800 (PST) In-Reply-To: <569132A9.8020600@gmail.com> 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:93366 Archived-At: --===============0115990426779634455== Content-Type: multipart/alternative; boundary=089e0153686e76d1760529957d40 --089e0153686e76d1760529957d40 Content-Type: text/plain; charset=UTF-8 Thanks, this works for figures. I couldn't get the same to work for chapters, sections, etc. \setuphead[chapter,section][conversion=lefttorightnumber] This does not have any effect. The solution I had in the first email of this thread (see below) has another issue, which I discovered later. \setuphead[chapter,title,section,subject][numbercommand=\righttoleft] The 12th section in the first chapter is written as 1.12 instead of 12.1; I want the latter because of r2l align. Another question: how do I change the separator to something else, say --? I have played with separator and separatorset, but neither seems to work. On Sat, Jan 9, 2016 at 11:17 AM, Wolfgang Schuster < schuster.wolfgang@gmail.com> wrote: > Mohammad Hossein Bateni > 3. Januar 2016 um 20:46 > Hi, > > Again this has been partly discussed on the list and solutions were > already there but I didn't see anyone mention the issue with figures. > > In the following MWE we have 20 pages of a simple text with a section, a > footnote and a figure on each page. The page numbers and footnote numbers > are fine. Section numbers need some care to appear correctly. I couldn't > figure out a similar mechanism for figure numbers, though. The example > does not use Indic numbers, which does not have any effect on the problem. > > > \setupdirections[bidi=global,method=two] > \setupalign[r2l] > > %% If we don't provide the numbercommand, we'll see reverse numbering > starting from 10. > \setuphead[chapter,title,section,subject][numbercommand=\righttoleft] > %% The following does not accept any numbercommand but it has > numberconversion. > %% As a result figure numbers are shown in reverse. > \setupcaptions[numberstopper={:}] > %% Footnotes are fine and accept conversion. > %% Page numbers are also okay. > > \starttext > > \dorecurse{20}{ > > \section{Test} > This is a very simple text. > And we have a footnote\footnote{Footnote text}. > > \placefigure > [][] > {Test figure.} > {\centerline{FIGURE BODY}} > > \page > } > > \stoptext > > You can use processors. > > \setupalign[righttoleft] > > \defineprocessor [lefttoright][style=\lefttoright] > \defineconversionset[lefttorightnumber][][lefttoright->n] > > \setupcaption[figure][numberconversionset=lefttorightnumber] > > \starttext > > \chapter{Chapter} > > \dorecurse{20}{\placefigure{Dummy > figure}{\blackrule[width=8cm,height=2cm]}} > > \stoptext > > Wolfgang > > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ > --089e0153686e76d1760529957d40 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks, this works for figures.

I could= n't get the same to work for chapters, sections, etc.

\setuphead[chapter,section][conversion=3Dlefttorightnumber]

This does not have any effect.

<= br>
The solution I had in the first email of this thread (see bel= ow) has another issue, which I discovered later.

<= span style=3D"font-size:12.8px">\setuphead[chapter,title,section,subject][numbercommand=3D\righttoleft]

The 12th section in the first = chapter is written as 1.12 instead of 12.1; I want the latter because of r2= l align.

Another question: how do I change the sep= arator to something else, say --?=C2=A0 I have played with separator and se= paratorset, but neither seems to work.


On Sat, Jan 9, 2016 at 11:1= 7 AM, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
= 3.=20 Januar 2016 um 20:46
Hi,

Again this has been partly discussed on the list and solutions were already=20 there but I didn't see anyone mention the issue with figures.

In the following MWE we have 20 pages of a simple text with a section, a=20 footnote and a figure on each page.=C2=A0 The page numbers and footnote=20 numbers are fine.=C2=A0 Section numbers need some care to appear correctly.= =C2=A0 I couldn't figure out a similar mechanism for figure numbers, though.=C2= =A0=20 The example does not use Indic numbers, which does not have any effect=20 on the problem.


\setupdirections[bidi=3Dgl= obal,method=3Dtwo]
\setupalign[r2l]

%% If we don't provide the numbercommand, we'll see reverse numbering= =20 starting from 10.
\setuphead[chapter,title,section,subject][numbercomman= d=3D\righttoleft]
%% The following does not accept any numbercommand but it has=20 numberconversion.
%% As a result figure numbers are shown in reverse.\setupcaptions[numberstopper=3D{:}]
%% Footnotes are fine and accept conversion.
%% Page numbers are also=20 okay.

\starttext

\dorecurse{20}{

\section{Test}
Thi= s is a very simple text.
And we have a footnote\footnote{Footnote=20 text}.

\placefigure
[][]
{Test figure.}
{\centerline{FIGURE BODY}}

\page
}

\stoptext
You can use processors.

\setupalign[righttoleft]

\defineprocessor [lefttoright][style=3D\lefttoright]
\defineconversionset[lefttorightnumber][][lefttoright->n]

\setupcaption[figure][numberconversionset=3Dlefttorightnumber]

\starttext

\chapter{Chapter}

\dorecurse{20}{\placefigure{Dummy=20 figure}{\blackrule[width=3D8cm,height=3D2cm]}}

\stoptext

Wolfgang

_______________________________________________________________________= ____________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________

--089e0153686e76d1760529957d40-- --===============0115990426779634455== 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= --===============0115990426779634455==--