From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93245 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: RTL problem with figure numbers Date: Sat, 09 Jan 2016 17:17:45 +0100 Message-ID: <569132A9.8020600@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6968218778439921188==" X-Trace: ger.gmane.org 1452356316 24244 80.91.229.3 (9 Jan 2016 16:18:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2016 16:18:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 09 17:18:25 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 1aHwDf-0003TS-Q7 for gctc-ntg-context-518@m.gmane.org; Sat, 09 Jan 2016 17:18:23 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9AA385E80; Sat, 9 Jan 2016 17:18:01 +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 Vgt_rEKilmpy; Sat, 9 Jan 2016 17:18:00 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id E364E5E82; Sat, 9 Jan 2016 17:18:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4FC4D5DD0 for ; Sat, 9 Jan 2016 17:18:00 +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 POuYtFdxcJDo for ; Sat, 9 Jan 2016 17:17:59 +0100 (CET) Original-Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) (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 91CA25D93 for ; Sat, 9 Jan 2016 17:17:49 +0100 (CET) Original-Received: by mail-wm0-f50.google.com with SMTP id f206so166775093wmf.0 for ; Sat, 09 Jan 2016 08:17:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=mHnIRABkQnTUrzTJ4idtF5KT85gPH740rtA40uE4vMw=; b=D5cvr8XOAH1L9KSp2N2R/QjchR/PSNYIgva94lWLVC4tt9YRlcWuRKdVONiboLeNc/ uZ9H2ayn7ueyrhXiR0EcvolhpuSXXlinLIIRFUJbeqq3SGJDthWS1vVjxNeUS7ox/Sd4 AtwTx57TJfpm1o0+r5L3A4+oJgjuVd1S5B/MxqNNzcUQsDnfDLQnUn1vf8DAQ57zJFTH g0sW+G/r5hXc1ea+uchBWblJAyNIc4Aq/+nQulwSPpTXOpBqB2eM/7mVj1+LBHkEDeOu xYozNsEEm62R4JnKqmX5YPE5nBMGSJQ3uEeAQgUFFBNqSK0H8ih/+5gveobmADrPKORh Uzmw== X-Received: by 10.194.203.137 with SMTP id kq9mr81220138wjc.129.1452356268886; Sat, 09 Jan 2016 08:17:48 -0800 (PST) Original-Received: from keima.localdomain (x2f2b275.dyn.telefonica.de. [2.242.178.117]) by smtp.gmail.com with ESMTPSA id m16sm4376914wmb.13.2016.01.09.08.17.47 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jan 2016 08:17:48 -0800 (PST) User-Agent: Postbox 4.0.8 (Macintosh/20151105) 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:93245 Archived-At: This is a multi-part message in MIME format. --===============6968218778439921188== Content-Type: multipart/alternative; boundary="------------050608090906010605050002" This is a multi-part message in MIME format. --------------050608090906010605050002 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > 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 --------------050608090906010605050002 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.
<= br>
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 correctl= y.=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=3D= global,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][numbercomm= and=3D\righttoleft]
%% The following does not accept any numbercommand but it has=20 numberconversion.
%% As a result figure numbers are shown in reverse.<= br>\setupcaptions[numberstopper=3D{:}]
%% Footnotes are fine and accept conversion.
%% Page numbers are also=20 okay.

\starttext

\dorecurse{20}{

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

\placefigure
[][]
{Test figure.}
{\centerline{FIGU= RE BODY}}

\page
}

\stoptext
<= /div>
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
--------------050608090906010605050002-- --===============6968218778439921188== 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= --===============6968218778439921188==--