Re: [NTG-context] Bidi-related register problem

2019-01-27 Thread Hans Hagen

On 1/27/2019 7:15 PM, Rik Kabel wrote:

That allows the compilation to complete, but method=three breaks other 
stuff. Try this:


\starttext
\setupdirections [bidi=on,method=three]
\rightaligned{(( How is this?}
\stoptext

(I also see problems with boxes set in the margin where before they were 
set centered in the textblock, but cannot construct an example yet.)

small samples will help (after i updated the beta)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bidi-related register problem

2019-01-27 Thread Rik Kabel

On 1/27/2019 12:07, Hans Hagen wrote:

On 1/27/2019 12:59 AM, Rik Kabel wrote:

Here is a much-closer-to minimal example.


  \setupregister   [index] [maxwidth=4cm]
  \setupdirections [bidi=on,method=two]
  \starttext
  .\index{Mairzy doats and dozy doats and liddle lamzy divey}
  \placeindex
  \stoptext

With the \setupdirections line removed, all is well. However, that 
line is otherwise required. Setting bidi off around \placeindex is 
not an option either, since some index entries require it.
Tricky ... i'll catch it but better use method tree then (later this 
year i might redo some r2l code)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


That allows the compilation to complete, but method=three breaks other 
stuff. Try this:


   \starttext
   \setupdirections [bidi=on,method=three]
   \rightaligned{(( How is this?}
   \stoptext

(I also see problems with boxes set in the margin where before they were 
set centered in the textblock, but cannot construct an example yet.)


--
Rik

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bidi-related register problem

2019-01-27 Thread Hans Hagen

On 1/27/2019 12:59 AM, Rik Kabel wrote:

Here is a much-closer-to minimal example.


  \setupregister   [index] [maxwidth=4cm]
  \setupdirections [bidi=on,method=two]
  \starttext
  .\index{Mairzy doats and dozy doats and liddle lamzy divey}
  \placeindex
  \stoptext

With the \setupdirections line removed, all is well. However, that line 
is otherwise required. Setting bidi off around \placeindex is not an 
option either, since some index entries require it.
Tricky ... i'll catch it but better use method tree then (later this 
year i might redo some r2l code)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bidi-related register problem

2019-01-26 Thread Rik Kabel

And shorter still, isolating the problem to something in \limitatetext:

 \setupdirections [bidi=on,method=two]
 \starttext
 \limitatetext {Mairzy doats and dozy doats and liddle lamzy divey} {4cm}
 \stoptext

--
Rik

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bidi-related register problem

2019-01-26 Thread Rik Kabel

Here is a much-closer-to minimal example.


 \setupregister   [index] [maxwidth=4cm]
 \setupdirections [bidi=on,method=two]
 \starttext
 .\index{Mairzy doats and dozy doats and liddle lamzy divey}
 \placeindex
 \stoptext

With the \setupdirections line removed, all is well. However, that line 
is otherwise required. Setting bidi off around \placeindex is not an 
option either, since some index entries require it.



--
Rik Kabel

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Bidi-related register problem

2019-01-24 Thread Rik Kabel
Recent betas have introduced a bidi-related problem with register 
processing.


In the following example, compilation generates a recoverable error when 
register processing has to trim an entry to fit maxwidth. The error is:


luatex warning  > node filter: error: 
...eXt/tex/texmf-context/tex/context/base/mkiv/typo-dub.lua:496: attempt to index 
local 'stacktop' (a nil value)

Removing the maxwidth constraint, or setting it to a much wider value, 
allows error-free compilation.


Without \setupdirections[bidi=on,method=two] there is no problem, but 
without it RTL texts are not handled properly. This is a recent change; 
bidi=global worked a few months ago. (I have not tried with LTR text in 
a default-RTL document).


   % macros=mkvi
   \defineregister[Mindex]
   \setupregister [Mindex]
   [n=2,
maxwidth=4cm,
balance=no]

   \starttexdefinition unexpanded MIndex
  \dosinglegroupempty\doMIndex
   \stoptexdefinition

   \starttexdefinition unexpanded doMIndex #MARKER
  \def\Marker{#MARKER}%
  \dosinglegroupempty\doMIndexFull
   \stoptexdefinition

   \starttexdefinition doMIndexFull #ITEM
  \doifelse{#ITEM}{}
{\expanded{\Mindex{\Marker}}}
{\expanded{\Mindex{\Marker+#ITEM}}}
   \stoptexdefinition

   \setupdirections [bidi=on,method=two]

   \setupbodyfont   [libertinus,11pt]

   \starttext

   \startparagraph
  \MIndex{One}{Mairzy doats and dozy doats and liddle lamzy divey}

  \input jojomayer

   \stopparagraph

   \startparagraph
   סלאם שלום
   \stopparagraph

   \placeregister[Mindex]
   \stoptext

--
Rik Kabel


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___