diff options
author | Karl Berry <karl@freefriends.org> | 2019-04-01 21:10:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-04-01 21:10:44 +0000 |
commit | de9dc4bb86a87f4d72b59034b56593313b2e8c8a (patch) | |
tree | afcde74e28915439fef0d65c8a1eefeb9dc9df7a /Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua | |
parent | 98766f71d95e3aa7dcf598359ffb0f9902c73797 (diff) |
babel (1apr19)
git-svn-id: svn://tug.org/texlive/trunk@50699 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua index 6961dd84221..008d27e0658 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua @@ -74,6 +74,7 @@ function Babel.bidi(head, ispar) local new_dir = false local first_dir = false + local inmath = false local last_lr @@ -104,6 +105,7 @@ function Babel.bidi(head, ispar) end end dir = dir or 'l' + if inmath then dir = ('TRT' == tex.mathdir) and 'r' or 'l' end if new_dir then attr_dir = 0 for at in node.traverse(item.attr) do @@ -131,9 +133,11 @@ function Babel.bidi(head, ispar) if dir == 'et' or dir == 'es' then dir = 'on' end -- W6 strong_lr = 'r' -- W3 end - elseif item.id == node.id'dir' then + elseif item.id == node.id'dir' and not inmath then new_dir = true dir = nil + elseif item.id == node.id'math' then + inmath = (item.subtype == 0) else dir = nil -- Not a char end |