From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94613 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: RTL \definedescriptions Date: Sun, 1 May 2016 16:37:54 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a1137b5bec32cd70531cdd90f X-Trace: ger.gmane.org 1462135122 8633 80.91.229.3 (1 May 2016 20:38:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 May 2016 20:38:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun May 01 22:38:31 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 1awy8M-0006th-Le for gctc-ntg-context-518@m.gmane.org; Sun, 01 May 2016 22:38:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E266AB6CD; Sun, 1 May 2016 22:38:10 +0200 (CEST) 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 ihmYyLTR9rII; Sun, 1 May 2016 22:38:10 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 1B8F4B6DC; Sun, 1 May 2016 22:38:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 750FAB6CC for ; Sun, 1 May 2016 22:38:08 +0200 (CEST) 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 ERmFjNXqvrNU for ; Sun, 1 May 2016 22:38:07 +0200 (CEST) Original-Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) (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 2B770B6CA for ; Sun, 1 May 2016 22:37:56 +0200 (CEST) Original-Received: by mail-oi0-f54.google.com with SMTP id v145so137741787oie.0 for ; Sun, 01 May 2016 13:37:56 -0700 (PDT) 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; bh=Oon20XB7WkM3bNu3wrVi/c444CA21MaVepWVvz4tzWc=; b=ImmASBEoANGO/beG8jE9U8DQZEXf2rDuV5WwzFVTTR1RHCaN3m5J11mVICqW0vIrJa pN2RbCiHevyEw4Mx9DqsYdvbApTX3VK8Xmjj66Nr0JouhbxrXeMEkQI+PL60H0zTefB1 lo5Y6jflLh6aZqjQEeavJlcZJ8hB1lbtzppjRy5kdmNWD8kKVvL1YvXHRjDvDRtNrTnw jk+8xPtZi/rBqN2M9AG4gX9SAvZCcFqy/BFYy+ugkhLf30Nohnp0s1iSdIQfD7qweg+s LKwvSBzQyFdlQTmi/8O76VDdFdVQj0UGosvQAvHPT0Wi1XYOXrs1IDqP+cjv5wyKKHiL DxVQ== 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; bh=Oon20XB7WkM3bNu3wrVi/c444CA21MaVepWVvz4tzWc=; b=kKuuHxDKOFSUwEFOrA3llJwRzhmjCkBDr1aJl6xdnLZ6bCZs/aYOHHAVFjdAz5A4dI ZjbSX+cGaDBqf2ORfhuxiZPAcG2inYIQldH8PaLNO38zpUVDcX+JuhK4VqJBYiuhvQ5g 8k02VXavKBt6o/cBrc/Qcj+IV8nJgRBgVxykX1SYUoWjGCA/wJC+UpvbSMq/U3FG/+OB HG22SJLyRmnnJeTz2xim3ibL1yxMjdYJUes/Q0UKMWB4NzlBzC/FuUTEK1P9cMwu48s4 6qhrXaQ9X3wgsDDfAbvNmH4fKRrORUXzRVgluopscxDBmIL9qmHxpwGTIMD7JyISsvP+ Z4Ig== X-Gm-Message-State: AOPr4FUOBsY9uOCfVevQdDntHtuXaEZRbxA4lSIKL0eis77M2kWnMRwa36ndS8ycXupRq5qkhqIxBSp3jqRh7g== X-Received: by 10.202.201.197 with SMTP id z188mr13445806oif.176.1462135075046; Sun, 01 May 2016 13:37:55 -0700 (PDT) Original-Received: by 10.157.3.34 with HTTP; Sun, 1 May 2016 13:37:54 -0700 (PDT) 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:94613 Archived-At: --001a1137b5bec32cd70531cdd90f Content-Type: multipart/alternative; boundary=001a1137b5bec32ccf0531cdd90d --001a1137b5bec32ccf0531cdd90d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello Hans, I looked more into this and have now "fixed" everything but the margin-related alternatives. In the attached file, I have redefined one macro and two setups from strc-con.mkvi. These involve changing three \vtop's to \autodirvtop's as well as changing left and flushleft to right and flushright (and the other way around) depending on paragraph direction. Now it is possible to get the exact mirror behavior for RTL/LTR if one sets headalign properly. I tested it on alternatives in {left, right, top, serried, hanging} and with hang=3Dx option. I have run into a dilemma, though. Sometimes left and right retain their meanings in LTR and RTL and sometimes they mean opposite things. I mean, alternative=3Dleft in RTL acts *similarly* to alternative=3Dright in LTR; however, headalign=3Dleft sort of has the same meaning in LTR and RTL. Thi= s sometimes becomes confusing in setting the macro/setup parameters. Is there a simple philosophy here? =E2=80=94MHB On Sun, May 1, 2016 at 11:53 AM, Mohammad Hossein Bateni wrote: > Hans & Wolfgang, > > I'm updating the RTL page . The > version used on the wiki, apparently the stable version from texlive 2015= , > does certain things differently. When using alternative=3Dserried, the l= ast > line of the paragraph has incorrect alignment. This is not the case in t= he > beta version. > > On the other hand, with bidi algorithm turned on, the wiki context places > the head on the right if I use alternative=3Dtop, only when the text is i= n > Persian. In the beta, the situation is more stable but incorrect: it > places the head on the left-hand side no matter what. > > =E2=80=94MHB > > On Thu, Apr 28, 2016 at 9:22 PM, Mohammad Hossein Bateni > wrote: > >> Hello Hans and Wolfgang, >> >> I tried different options in \definedescription and compared LTR and RTL >> behavior. There are certain inconsistencies/bugs in the RTL setting. >> Attached you can see a TeX file and the resulting PDF, trying different >> options. The first two pages consider different parameters in the LTR >> setting and then the same come in the RTL environment. >> >> In the following I use alt instead of alternative. >> >> Here are the issues I noticed: >> >> 1) Why isn't the head text consistently mirrored in the RTL environment? >> It happens only in alt=3Dserried. >> >> 2) Option hang=3D2 produces a strange result for RTL. The hanging part >> appears on the opposite side of the head text, which somehow pushes the >> head text outside the text area. >> >> 3) Option alt=3Dtop for RTL still puts the head text on the left-hand si= de. >> >> 4) I expect the LTR and RTL versions of the same settings to mirror one >> another, but they do not. Although LTR/alt=3Dleft and RTL/alt=3Dright = look >> pretty similar (and so do LTR/alt=3Dright and RTL/alt=3Dleft), but these= pairs >> do not mirror one another. In particular, there is some space to the ri= ght >> of the head text in LTR/alt=3Dright, while there is none to the left of >> LTR/alt=3Dleft. The same thing shows in the margin alternatives where t= he >> distance between the head text and the body is different in RTL and LTR. >> >> =E2=80=94MHB >> > > --001a1137b5bec32ccf0531cdd90d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello Hans,

I looked more into th= is and have now "fixed" everything but the margin-related alterna= tives.=C2=A0 In the attached file, I have redefined one macro and two setup= s from strc-con.mkvi.=C2=A0 These involve changing three \vtop's to \au= todirvtop's as well as changing left and flushleft to right and flushri= ght (and the other way around) depending on paragraph direction.

Now it is possible to get the exact mirror behavior for RTL/LTR if= one sets headalign properly.=C2=A0 I tested it on alternatives in {left, r= ight, top, serried, hanging} and with hang=3Dx option.

=
I have run into a dilemma, though.=C2=A0 Sometimes left and right reta= in their meanings in LTR and RTL and sometimes they mean opposite things.= =C2=A0 I mean, alternative=3Dleft in RTL acts similarly=C2=A0to alte= rnative=3Dright in LTR; however, headalign=3Dleft sort of has the same mean= ing in LTR and RTL.=C2=A0 This sometimes becomes confusing in setting the m= acro/setup parameters.=C2=A0 Is there a simple philosophy here?
<= br>
=E2=80=94MHB

On Sun, May 1, 2016 at 11:53 AM, Mohammad Hossein Bate= ni <bateni@gmail.com> wrote:
Hans & Wolfgang,

I'm up= dating the = RTL page.=C2=A0 The version used on the wiki, apparently the stable ver= sion from texlive 2015, does certain things differently.=C2=A0 When using a= lternative=3Dserried, the last line of the paragraph has incorrect alignmen= t.=C2=A0 This is not the case in the beta version.

On th= e other hand, with bidi algorithm turned on, the wiki context places the he= ad on the right if I use alternative=3Dtop, only when the text is in Persia= n.=C2=A0 In the beta, the situation is more stable but incorrect: it places= the head on the left-hand side no matter what.

=E2=80=94MHB
=
On Thu, Apr 28, 2016 at 9:22 PM, Mohammad Ho= ssein Bateni <bateni@gmail.com> wrote:
Hello Hans and Wolfgang,

= I tried different options in \definedescription and compared LTR and RTL be= havior.=C2=A0 There are certain inconsistencies/bugs in the RTL setting.=C2= =A0 Attached you can see a TeX file and the resulting PDF, trying different= options.=C2=A0 The first two pages consider different parameters in the LT= R setting and then the same come in the RTL environment.

In the following I use alt instead of alternative.

Here are the issues I noticed:

1) Why isn&= #39;t the head text consistently mirrored in the RTL environment?=C2=A0 It = happens only in alt=3Dserried.

2) Option hang=3D2 = produces a strange result for RTL.=C2=A0 The hanging part appears on the op= posite side of the head text, which somehow pushes the head text outside th= e text area.

3) Option alt=3Dtop for RTL still put= s the head text on the left-hand side.

4) I expect= the LTR and RTL versions of the same settings to mirror one another, but t= hey do not. =C2=A0 Although LTR/alt=3Dleft and RTL/alt=3Dright look pretty = similar (and so do LTR/alt=3Dright and RTL/alt=3Dleft), but these pairs do = not mirror one another.=C2=A0 In particular, there is some space to the rig= ht of the head text in LTR/alt=3Dright, while there is none to the left of = LTR/alt=3Dleft.=C2=A0 The same thing shows in the margin alternatives where= the distance between the head text and the body is different in RTL and LT= R.

=E2=80=94MHB


--001a1137b5bec32ccf0531cdd90d-- --001a1137b5bec32cd70531cdd90f Content-Type: application/octet-stream; name="p-dabeer-patch-strc-con.mkiv" Content-Disposition: attachment; filename="p-dabeer-patch-strc-con.mkiv" Content-Transfer-Encoding: base64 X-Attachment-Id: f_inp1cgvv0 JSUgVGhlc2UgYXJlIGEgZmV3IGV4cGVyaW1lbnRhbCBwYXRjaGVzIHRvIG1ha2Ugc3RyYy1jb24u bWt2aSAoYW5kIGFzCiUlIGEgcmVzdWx0IHN0cmMtZGVzLm1raXYgYW5kIHN0cmMtZW51Lm1raXYp IGJlaGF2ZSBiZXR0ZXIgaW4gUlRMCiUlIHNldHRpbmdzLiAgSSBhZHZpc2UgeW91IHRvIG5vdCB1 c2UgdGhpcyBmaWxlIHVubGVzcyB5b3Uga25vdyB3aGF0CiUlIHlvdSBhcmUgZG9pbmcuCgpcdW5w cm90ZWN0CgolJSBJIHVzZSB0aGVzZSB0byBzZXQgaGVhZGFsaWduIGtleXMsIHNvIHRoYXQgdGhl eSBtaXJyb3IgaW4gUlRMIGFuZAolJSBMVFIgc2V0dGluZ3MuICBUaGV5IGNhbm5vdCBiZSB1c2Vk IGV2ZXJ5d2hlcmUsIHRob3VnaCwgYW5kIEkgZ3Vlc3MKJSUgdGhhdCBtYXkgaGF2ZSB0byBkbyB3 aXRoIGV4cGFuc2lvbnMuClxkZWZpbmVcYXV0b2RpcmxlZnR7XGlmY29uZGl0aW9uYWxcZGlzcGxh eWxlZnR0b3JpZ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lvbnNfc2V0X2hhbmdfYm94XHYhZmx1c2hyaWdodAogICAgXHN0cmNf Y29uc3RydWN0aW9uc19zZXRfaGFuZ1x2IXJpZ2h0CiAgICBcbm9pbmRlbnQKICAgIFxybGFwIHsK ICAgICAgICBcaGJveCB0byBcZGltZXhwclxoc2l6ZS1cbGVmdHNraXAtXHJpZ2h0c2tpcFxyZWxh eCB7CiAgICAgICAgICAgIFxoc3MKICAgICAgICAgICAgXHZ0b3AgdG8gXHplcm9wb2ludCB7CiAg ICAgICAgICAgICAgICBcYm94XGNvbnN0cnVjdGlvbmhlYWRib3gKICAgICAgICAgICAgfQogICAg ICAgIH0KICAgIH0KICAgIFxub2JyZWFrCiAgICBcdXNlY29uc3RydWN0aW9uc3R5bGVhbmRjb2xv clxjIXN0eWxlXGMhY29sb3IKICAgIFxpZ25vcmVzcGFjZXMKXGVsc2UKICAgIFxsZXRcXD1cY3Js ZgogICAgXGRvbnRjb21wbGFpbgogICAgXGFkdmFuY2VcY29uc3RydWN0aW9uc2hlYWR3aWR0aCBc Y29uc3RydWN0aW9uc2hlYWRkaXN0YW5jZQogICAgXHN0cmNfY29uc3RydWN0aW9uc19zZXRfaGFu Z19ib3hcdiFmbHVzaGxlZnQgICUlCiAgICBcc3RyY19jb25zdHJ1Y3Rpb25zX3NldF9oYW5nXHYh bGVmdCAlJQogICAgXG5vaW5kZW50CiAgICBccmxhcCB7CiAgICAgICAgXGhib3ggdG8gXGRpbWV4 cHJcaHNpemUtXGxlZnRza2lwLVxyaWdodHNraXBccmVsYXggewogICAgICAgICAgICBcaHNzCiAg ICAgICAgICAgIFx2dG9wIHRvIFx6ZXJvcG9pbnQgewogICAgICAgICAgICAgICAgXGJveFxjb25z dHJ1Y3Rpb25oZWFkYm94CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBcbm9icmVh awogICAgXHVzZWNvbnN0cnVjdGlvbnN0eWxlYW5kY29sb3JcYyFzdHlsZVxjIWNvbG9yCiAgICBc aWdub3Jlc3BhY2VzClxmaQpcc3RvcHNldHVwcwoKXHByb3RlY3QK --001a1137b5bec32cd70531cdd90f 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= --001a1137b5bec32cd70531cdd90f--