ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bidi-related register problem
@ 2019-01-25  1:36 Rik Kabel
  2019-01-26 23:59 ` Rik Kabel
  0 siblings, 1 reply; 6+ messages in thread
From: Rik Kabel @ 2019-01-25  1:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1677 bytes --]

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



[-- Attachment #1.2: Type: text/html, Size: 1898 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-28  1:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25  1:36 Bidi-related register problem Rik Kabel
2019-01-26 23:59 ` Rik Kabel
2019-01-27  3:40   ` Rik Kabel
2019-01-27 17:07   ` Hans Hagen
2019-01-27 18:15     ` Rik Kabel
2019-01-28  1:05       ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).