summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua')
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
index 8acc02ed6fe..02e7b7889d1 100644
--- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
+++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
@@ -7,7 +7,7 @@
-- babel.dtx (with options: `basic')
--
--
--- Copyright (C) 2012-2020 Javier Bezos and Johannes L. Braams.
+-- Copyright (C) 2012-2021 Javier Bezos and Johannes L. Braams.
-- Copyright (C) 1989-2012 Johannes L. Braams and
-- any individual authors listed elsewhere in this file.
-- All rights reserved.
@@ -268,6 +268,12 @@ function Babel.bidi(head, ispar, hdir)
has_en = false
end
+ -- Force mathdir in math if ON (currently works as expected only
+ -- with 'l')
+ if inmath and d == 'on' then
+ d = ('TRT' == tex.mathdir) and 'r' or 'l'
+ end
+
if d then
if d == 'al' then
d = 'r'