New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MWE: \hbox in RTL issue #1796
Labels
bug
Software bug issue
Comments
Putting this here for reference as I try to diff --git a/typesetters/base.lua b/typesetters/base.lua
index 6c65848..cea1692 100644
--- a/typesetters/base.lua
+++ b/typesetters/base.lua
@@ -936,7 +936,6 @@ function typesetter:makeHbox (content)
depth = d,
value = recentContribution,
outputYourself = function (box, atypesetter, line)
- local _post = _rtl_pre_post(box, atypesetter, line)
local ox = atypesetter.frame.state.cursorX
local oy = atypesetter.frame.state.cursorY
SILE.outputter:setCursor(atypesetter.frame.state.cursorX, atypesetter.frame.state.cursorY)
@@ -945,7 +944,7 @@ function typesetter:makeHbox (content)
end
atypesetter.frame.state.cursorX = ox
atypesetter.frame.state.cursorY = oy
- _post()
+ atypesetter.frame:advanceWritingDirection(box:scaledWidth(line))
SU.debug("hboxes", function ()
SILE.outputter:debugHbox(box, box:scaledWidth(line))
return "Drew debug outline around hbox"
|
And here for the bidi part (WIP): diff --git a/packages/bidi/init.lua b/packages/bidi/init.lua
index b9eab11..c507cc2 100644
--- a/packages/bidi/init.lua
+++ b/packages/bidi/init.lua
@@ -204,6 +204,13 @@ function package.reorder (_, n, typesetter)
if nl[i].is_nnode and levels[i].level %2 ~= base_level then
SU.flip_in_place(nl[i].nodes)
reverse_each_node(nl[i].nodes)
+ elseif nl[i].is_hbox and levels[i].level %2 ~= base_level and not nl[i].bidiDone then
+ for j = 1, #nl[i].value do
+ if nl[i].value[j].is_nnode then
+ SU.flip_in_place(nl[i].value[j].nodes)
+ reverse_each_node(nl[i].value[j].nodes)
+ end
+ end
elseif nl[i].is_discretionary and levels[i].level %2 ~= base_level and not nl[i].bidiDone then
for j = 1, #(nl[i].replacement) do
if nl[i].replacement[j].is_nnode then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: