<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px;">
<div>
<div style="font-family: Calibri, sans-serif;">Vafa, (attempts to reply off-list for some reason are causing bounces)</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<div>Since your off list note, I’ve done a few things to get around the problem. E.g. <span style="font-size: medium;"> I created a command</span></div>
<div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">\newcommand{\thb}[1]{\mbox{}\texthebrew{#1}\mbox{}}</div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">And this solved the problems I described to you. But if I embed it in</div>
<div style="font-size: medium;">another command like</div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">\newcommand{\bgdkpt}{\thb{בגדכפת}}</div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">(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:</div>
<div style="font-size: medium;">——</div>
<div style="font-size: medium;">\documentclass{memoir}</div>
<div style="font-size: medium;">\usepackage{fontspec,libertine,polyglossia}</div>
<div style="font-size: medium;">\setotherlanguage[]{hebrew}</div>
<div style="font-size: medium;">\newfontfamily{\hebrewfont}[Script=Hebrew]{SBL Hebrew}</div>
<div style="font-size: medium;">\begin{document}</div>
<div style="font-size: medium;">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.</div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">Now let's try a list:</div>
<div style="font-size: medium;">\begin{itemize}</div>
<div style="font-size: medium;">\item<span class="Apple-tab-span" style="white-space:pre">
</span>An English item.</div>
<div style="font-size: medium;">\item<span class="Apple-tab-span" style="white-space:pre">
</span>\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. </div>
<div style="font-size: medium;">\item<span class="Apple-tab-span" style="white-space:pre">
</span>An English item.</div>
<div style="font-size: medium;">\item<span class="Apple-tab-span" style="white-space:pre">
</span>\texthebrew{עברית} rather than English.</div>
<div style="font-size: medium;">\end{itemize}</div>
<div style="font-size: medium;">\end{document}</div>
<div style="font-size: medium;">——</div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">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</div>
<div style="font-size: medium;">attached logs too.) As I mentioned before, this *used* to work. I think it is caused by an incompatibility introduced with polyglossia. The PDF</div>
<div style="font-size: medium;">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</div>
<div style="font-size: medium;">found how to do it on Google….</div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">If you or anyone else has any thoughts on this, I’d be happy to hear about them. With thanks,</div>
<div style="font-size: medium;"><br>
</div>
<div style="font-size: medium;">K</div>
</div>
<div style="font-family: Calibri, sans-serif;">
<div><br>
</div>
<div>Karljürgen G. Feuerherm, PhD | 2-139 Department of History | Wilfrid Laurier University | 75 University Avenue West | Waterloo, Ontario N2L 3C5</div>
<div><br>
</div>
</div>
</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif;">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Karljürgen Feuerherm <<a href="mailto:kfeuerherm@wlu.ca">kfeuerherm@wlu.ca</a>><br>
<span style="font-weight:bold">Reply-To: </span>"LuaTeX discussion." <<a href="mailto:luatex@tug.org">luatex@tug.org</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, October 1, 2014 at 10:56<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:luatex@tug.org">luatex@tug.org</a>" <<a href="mailto:luatex@tug.org">luatex@tug.org</a>><br>
<span style="font-weight:bold">Subject: </span>[luatex] Luabidi/polyglossia/bidi<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>Greetings—</div>
<div><br>
</div>
<div>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: <a href="http://tex.stackexchange.com/questions/188434/media-button-in-rtl">http://tex.stackexchange.com/questions/188434/media-button-in-rtl</a>,
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….</div>
<div><br>
</div>
<div>…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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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….)</div>
<div><br>
</div>
<div>With thanks,</div>
<div><br>
</div>
<div>K</div>
<div>
<div><br>
</div>
<div>Karljürgen G. Feuerherm, PhD | 2-139 Department of History | Wilfrid Laurier University | 75 University Avenue West | Waterloo, Ontario N2L 3C5</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>