From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93367 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:12:11 -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="===============3788133653324378343==" X-Trace: ger.gmane.org 1453097579 14818 80.91.229.3 (18 Jan 2016 06:12:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2016 06:12:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 18 07:12:47 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 1aL33U-00052g-Al for gctc-ntg-context-518@m.gmane.org; Mon, 18 Jan 2016 07:12:44 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5203B806; Mon, 18 Jan 2016 07:12:28 +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 wGzjMrVJCwXs; Mon, 18 Jan 2016 07:12:27 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 86E8A510B; Mon, 18 Jan 2016 07:12:27 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8A17049CD for ; Mon, 18 Jan 2016 07:12:26 +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 dR1qtzXEaqK3 for ; Mon, 18 Jan 2016 07:12:23 +0100 (CET) Original-Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com [209.85.214.171]) (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 BD317806 for ; Mon, 18 Jan 2016 07:12:12 +0100 (CET) Original-Received: by mail-ob0-f171.google.com with SMTP id py5so186698876obc.2 for ; Sun, 17 Jan 2016 22:12:12 -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=KB0kQmVBbL3LvbGv2LWE4q2tyXv0fYfbg23PJSj7wiQ=; b=F0ir/QMxy/KWA8ub3vkPVQ1YOQ2PocUwNGTo3pZu7/VHhbH89qokAhgbZFSNCr4Aq0 damoz2BeNBCRCLhdDjmW4LJq/JvMcMQ7SIcEp2fV0JgFeAuu+RKz5ltcRef7NxVLZiRN Lffia7BTMlYQUGm5DAt8H/NycKpiOLZZPjAQfTjMuwxL6t2AdVZhAKnglkIwfGszgP5M xySybE3Ts0LAZQ2sYRuruTz2NWy/AvvDeBSW6mcwv1WCt2IowmHTHFeAMo4MCMtGkcxP cMIE2JNnoSHvIXrzlXGrqXG11Vc8ZxQNoMym5WACud1CLLq8mtWJ6WLGmcMSudRCDlqG tihQ== 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=KB0kQmVBbL3LvbGv2LWE4q2tyXv0fYfbg23PJSj7wiQ=; b=Jh2vXgkt5J85NY2DQeJ4ZME4Qvk8yKzH58IEvynsRPb/FUMpIUhfka5PFuYxEaFcfx taAMn2+ROc5i9IH6DcvhohvfmPIbW3eNMPi3XX4NLfFo6cI5eu/ejobjcrLDokcEOB2+ GY6F3dumxg9zQ4CoE6UCzKZFSKSuSEZ/3/P5OlH0Ry59EIpt2HCS1ArJWjaSCVMsz6BQ t/51DISr52Z0C0HCpyuVr1q1T6Tah97vc+Cucpjwzt6ekXovQ966RUuOBIoX0UlKLvDA bduDRq9hqOQy9KUDQ614rt+AsxS5h6qeu9HkmvTvUayI73006j5/v2pARKyfNex+P8UN qbfg== X-Gm-Message-State: ALoCoQmxXt3UFWzNBZNHl2F+0dNqoQdIEFBlWE1HC9ZO6Ybvuwgx4qf3PYb+hTUdeA121BRoIiKg8OeOFq+dyK9YUfk9sqrTjg== X-Received: by 10.60.117.3 with SMTP id ka3mr18589409oeb.9.1453097531084; Sun, 17 Jan 2016 22:12:11 -0800 (PST) Original-Received: by 10.202.188.132 with HTTP; Sun, 17 Jan 2016 22:12:11 -0800 (PST) In-Reply-To: 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:93367 Archived-At: --===============3788133653324378343== Content-Type: multipart/alternative; boundary=047d7b417ffb2a1e5f052995a2b4 --047d7b417ffb2a1e5f052995a2b4 Content-Type: text/plain; charset=UTF-8 I just found a solution to the last question: \defineseparatorset[dashsep][][{--}] \setuphead[section][sectionseparatorset=dashsep] On Mon, Jan 18, 2016 at 1:01 AM, Mohammad Hossein Bateni wrote: > 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 >> >> ___________________________________________________________________________________ >> > > --047d7b417ffb2a1e5f052995a2b4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I just found a solution to the last question:

\defineseparatorset[dashsep][][{--}]
\setuphead[section][sect= ionseparatorset=3Ddashsep]
On Mon, Jan 18, 2016 at 1:01 AM, Mohammad Hosse= in Bateni <bateni@gmail.com> wrote:
Thanks, this works for figures.

I couldn't get the same to work for chapters, sections, etc.

\setuphead[chapter,section][conversion=3Dlefttorightnumbe= r]

This does not have any effect.


The solution I had in the first email of this threa= d (see below) has another issue, which I discovered later.

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

The 12th section in the first c= hapter is written as 1.12 instead of 12.1; I want the latter because of r2l= align.

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


On S= at, Jan 9, 2016 at 11:17 AM, Wolfgang Schuster <schuster.wolfgan= g@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-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-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
___________________________________________________________________________= ________


--047d7b417ffb2a1e5f052995a2b4-- --===============3788133653324378343== 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= --===============3788133653324378343==--