[latex3-commits] [git/LaTeX3-latex3-babel] master: First attempt to fix mirroring in math (#134) (fa037ce)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Apr 1 19:40:35 CEST 2019
Repository : https://github.com/latex3/babel
On branch : master
Link : https://github.com/latex3/babel/commit/fa037ce33858a9e4cf6f2f44328d990ba4834fcc
>---------------------------------------------------------------
commit fa037ce33858a9e4cf6f2f44328d990ba4834fcc
Author: Javier Bezos <jbezos at users.noreply.github.com>
Date: Wed Mar 20 18:39:13 2019 +0100
First attempt to fix mirroring in math (#134)
>---------------------------------------------------------------
fa037ce33858a9e4cf6f2f44328d990ba4834fcc
babel.dtx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/babel.dtx b/babel.dtx
index 4623bd3..1497432 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -18144,6 +18144,7 @@ function Babel.bidi(head, ispar)
end
end
dir = dir or 'l'
+ if inmath then dir = ('TRT' == tex.mathdir) and 'r' or 'l' end
% \end{macrocode}
%
% Next is based on the assumption babel sets the language AND
@@ -18406,6 +18407,7 @@ function Babel.bidi(head, ispar, hdir)
local nodes = {}
local outer_first = nil
+ local inmath = false
local glue_d = nil
local glue_i = nil
@@ -18465,6 +18467,7 @@ function Babel.bidi(head, ispar, hdir)
end
end
d = d or 'l'
+ if inmath then d = ('TRT' == tex.mathdir) and 'r' or 'l' end
d_font = d_font or d
d_font = (d_font == 'l' and 0) or
@@ -18513,6 +18516,9 @@ function Babel.bidi(head, ispar, hdir)
glue_i = item
d = nil
+ elseif item.id == node.id'math' then
+ inmath = (item.subtype == 0)
+
else
d = nil
end
More information about the latex3-commits
mailing list