[luatex] Luabidi/polyglossia/bidi

Karljurgen Feuerherm kfeuerherm at wlu.ca
Thu Oct 9 18:59:12 CEST 2014


Vafa, (attempts to reply off-list for some reason are causing bounces)

Since your off list note, I’ve done a few things to get around the problem. E.g.  I created a command

\newcommand{\thb}[1]{\mbox{}\texthebrew{#1}\mbox{}}

And this solved the problems I described to you. But if I embed it in
another command like

\newcommand{\bgdkpt}{\thb{בגדכפת}}

(because I use that sequence frequently) the problem resurfaces (I get the impression that somehow this is related to how \newcommand works but haven’t found the solution yet). In any case, I have created an MWE which illustrates the general bug, attached:
——
\documentclass{memoir}
\usepackage{fontspec,libertine,polyglossia}
\setotherlanguage[]{hebrew}
\newfontfamily{\hebrewfont}[Script=Hebrew]{SBL Hebrew}
\begin{document}
This is banal and boring text. This is banal and boring text. This is banal and boring text. This is banal and boring text. This is banal and boring text. This is banal and boring text. This is \texthebrew{עברית} rather than English.

Now let's try a list:
\begin{itemize}
\item An English item.
\item \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English. \texthebrew{עברית} rather than English.
\item An English item.
\item \texthebrew{עברית} rather than English.
\end{itemize}
\end{document}
——

When compiled with XeLaTeXmk, works as expected. But if I put the fake “bidi.sty" in the directory (i.e. An alias called bidi.sty which points to luabidi.sty) and compile with LuaLaTeXmk, I get the screwed up text. (I’m on a Mac, I can’t speak for Windows behaviour unfortunately. So I’ve
attached logs too.) As I mentioned before, this *used* to work. I think it is caused by an incompatibility introduced with polyglossia. The PDF
documentation says polyglossia dates back to May, but I’m pretty sure that’s not true…. I’d revert it and see, but I don’t know how and haven’t
found how to do it on Google….

If you or anyone else has any thoughts on this, I’d be happy to hear about them. With thanks,

K

Karljürgen G. Feuerherm, PhD | 2-139 Department of History | Wilfrid Laurier University | 75 University Avenue West | Waterloo, Ontario N2L 3C5


From: Karljürgen Feuerherm <kfeuerherm at wlu.ca<mailto:kfeuerherm at wlu.ca>>
Reply-To: "LuaTeX discussion." <luatex at tug.org<mailto:luatex at tug.org>>
Date: Wednesday, October 1, 2014 at 10:56
To: "luatex at tug.org<mailto:luatex at tug.org>" <luatex at tug.org<mailto:luatex at tug.org>>
Subject: [luatex] Luabidi/polyglossia/bidi

Greetings—

I had been using XeLaTeX to typeset a Hebrew textbook I’m working on; but once I started introducing media9 buttons into RTL text, I ran into difficulty. The solution posed was a kind of hack described here: http://tex.stackexchange.com/questions/188434/media-button-in-rtl, I.e. To run LuaLaTex but trick polyglossia into thinking it was using XeTeX’s bidi when in fact it was luabidi. So I’ve been using luaTeX the last few months with success, but of course I was waiting for this to bite me….

…which lately it has. I understand that ordinarily I should offer an MWE highlighting the problem, but in this case that is likely to be difficult, so let me try to describe the problem.

Briefly, I haver found lately that \texthebrew{} commands were swallowing the following space, which I patched by adding a \ after the command; but more recently I’ve noticed (maybe it was happening before and I just didn’t see it) that after a \texthebrew{} we don’t get back to LTR mode properly, so that the remainder of a paragraph can end up right justified.

I suppose this is because of some updates to polyglossia or bidi, or alternatively lack thereof to luabidi. I wonder whether anyone can suggest approaches I can investigate to get back on the road? (possibly rolling back updates to polyglossia or bidi, but I don’t know how to do that….)

With thanks,

K

Karljürgen G. Feuerherm, PhD | 2-139 Department of History | Wilfrid Laurier University | 75 University Avenue West | Waterloo, Ontario N2L 3C5

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20141009/fbdb8bf8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PolyglossiaTest.log
Type: application/octet-stream
Size: 70492 bytes
Desc: PolyglossiaTest.log
URL: <http://tug.org/pipermail/luatex/attachments/20141009/fbdb8bf8/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PolyglossiaTestwithLua.log
Type: application/octet-stream
Size: 95474 bytes
Desc: PolyglossiaTestwithLua.log
URL: <http://tug.org/pipermail/luatex/attachments/20141009/fbdb8bf8/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PolyglossiaTestwithLua.pdf
Type: application/pdf
Size: 17313 bytes
Desc: PolyglossiaTestwithLua.pdf
URL: <http://tug.org/pipermail/luatex/attachments/20141009/fbdb8bf8/attachment-0001.pdf>


More information about the luatex mailing list