From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93259 Path: news.gmane.org!not-for-mail From: Mohammad Hossein Bateni Newsgroups: gmane.comp.tex.context Subject: Re: Paragraph breaking bug with BiDi text Date: Mon, 11 Jan 2016 11:58:19 -0500 Message-ID: References: <5693B180.9090506@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2513511186025468149==" X-Trace: ger.gmane.org 1452531550 561 80.91.229.3 (11 Jan 2016 16:59:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jan 2016 16:59:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 11 17:58:57 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 1aIfnz-0000BQ-E9 for gctc-ntg-context-518@m.gmane.org; Mon, 11 Jan 2016 17:58:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2D37A5F35; Mon, 11 Jan 2016 17:58:34 +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 KZF-ipfDXzmB; Mon, 11 Jan 2016 17:58:33 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 5DF8E5F3B; Mon, 11 Jan 2016 17:58:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CBBBA5F37 for ; Mon, 11 Jan 2016 17:58:32 +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 NumIBvtkj8J5 for ; Mon, 11 Jan 2016 17:58:32 +0100 (CET) Original-Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.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 1EA595F35 for ; Mon, 11 Jan 2016 17:58:21 +0100 (CET) Original-Received: by mail-oi0-f50.google.com with SMTP id p187so37117704oia.2 for ; Mon, 11 Jan 2016 08:58:21 -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=/qZCe0IqBaopo1yc4bi7rYEV6r6BQlV6jFzJ1JMcFH0=; b=UHUmWxzjGOTKmQ1cL3qTcVquZvrRxX6sa7Wy2jKQSDWiW6bGigvf+kxJCPYPIprkj8 CmTuo2IoBiJcpCBaPfGZ22720ltpIBg7vGdPelAB/2g7uhcsjeuCgnmebgLOvBZux/rd GMabnupFtPBLS4lOhhUw0lTBORWKq93vaw/MUoGwiSMBoMVK0epfXNWesl9ez7bENYJU N5udO0DsH9diTxxFElmSM7YiepItujem8KjFaFQhiHLVOUXNFNpv/xJeLb9S+yAo5eEP hk5mWakNQIZoXgnRLnPubIlZjjohqcz0pfFOWp93ftXIQHe+dFpPYnjhaJcAtY1pYcV6 ivRA== X-Received: by 10.202.86.5 with SMTP id k5mr91581754oib.125.1452531499962; Mon, 11 Jan 2016 08:58:19 -0800 (PST) Original-Received: by 10.202.57.86 with HTTP; Mon, 11 Jan 2016 08:58:19 -0800 (PST) In-Reply-To: <5693B180.9090506@wxs.nl> 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:93259 Archived-At: --===============2513511186025468149== Content-Type: multipart/alternative; boundary=001a113d226614a1af052911d80e --001a113d226614a1af052911d80e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > It is a side effect of what the the par builder considers to be valid > breakpoints. The current approach is playing very safe but after looking = at > it Taco and I decided that it can be a more tolerant with respect to end > dirs so the next luatex version will have that. > > Anyway: You need to code carefully: the space after "TRT" in "\textdir TR= T > x" is meaningful so in your example you introduce spaces. > Thanks for the explanation. So the space after \textdir TLT is meaningful but the one after \lefttoright isn't. (I guess, I should have used \textdir TLT\relax. I'm going to use the high-level \lefttoright command from now on.) Also, in context don't use \textdir etc directly, just use \lefttoright and > \righttoleft in combination with \setupalign as I will not spend much tim= e > on side effects of interfering with these low level dir changers directly= . > Great! You partly answered another question I meant to ask: what is the proper way to write \textdir and \pardir in CONTEXT? So \lefttoright and \righttoleft are replacements for \textdir TLT and \textdir TRT. How should I code in \pardir TRT in CONTEXT? I couldn't find anything for that in spac-ali.mkiv. Those low-level LuaTeX directives were part of an attempt to come to the core of a problem I'd run into with numbers at the end of a right-to-left line. The BiDi algorithm correctly gave left-to-right direction to that digit sequence and the result was that the word following the number had gone into the margin. =E2=80=94MHB --001a113d226614a1af052911d80e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It is a side effect of what the the par builder considers to b= e valid breakpoints. The current approach is playing very safe but after lo= oking at it Taco and I decided that it can be a more tolerant with respect = to end dirs so the next luatex version will have that.

Anyway: You need to code carefully: the space after "TRT" in &quo= t;\textdir TRT x" is meaningful so in your example you introduce space= s.

Thanks for the explanation.=C2=A0 So= the space after \textdir TLT is meaningful but the one after \lefttoright = isn't. =C2=A0(I guess, I should have used \textdir TLT\relax.=C2=A0 I&#= 39;m going to use the high-level \lefttoright command from now on.)

Also, in context don't use \textdir etc directly, just use \lefttoright= and \righttoleft in combination with \setupalign as I will not spend much = time on side effects of interfering with these low level dir changers direc= tly.

Great!=C2=A0 You partly answered a= nother question I meant to ask: what is the proper way to write \textdir an= d \pardir in CONTEXT?=C2=A0 So \lefttoright and \righttoleft are replacemen= ts for \textdir TLT and \textdir TRT.=C2=A0 How should I code in \pardir TR= T in CONTEXT?=C2=A0 I couldn't find anything for that in spac-ali.mkiv.=

Those low-level LuaTeX directives were part of an= attempt to come to the core of a problem I'd run into with numbers at = the end of a right-to-left line.=C2=A0 The BiDi algorithm correctly gave le= ft-to-right direction to that digit sequence and the result was that the wo= rd following the number had gone into the margin.

= =E2=80=94MHB
--001a113d226614a1af052911d80e-- --===============2513511186025468149== 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= --===============2513511186025468149==--