From: Rik Kabel <context@rik.users.panix.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Bidi-related register problem
Date: Thu, 24 Jan 2019 20:36:17 -0500 [thread overview]
Message-ID: <75c1c14d-fd00-c9f2-ac21-782a1fbeed47@rik.users.panix.com> (raw)
[-- 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
___________________________________________________________________________________
next reply other threads:[~2019-01-25 1:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 1:36 Rik Kabel [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=75c1c14d-fd00-c9f2-ac21-782a1fbeed47@rik.users.panix.com \
--to=context@rik.users.panix.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).