diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/luababel.def')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/luababel.def | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index d5c8c17511b..2978df88822 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -1334,12 +1334,42 @@ end \frozen@everydisplay\expandafter{% \expandafter\bbl@mathboxdir\the\frozen@everydisplay} \fi +\def\bbl@truellap{%s + \ifcase\bbl@attr@dir\expandafter\llap\else\expandafter\rlap\fi} +\def\bbl@truerlap{% + \ifcase\bbl@attr@dir\expandafter\rlap\else\expandafter\llap\fi} \bbl@trace{Redefinitions for bidi layout} +\AtBeginDocument{% amsmath + \ifx\place@tag\@undefined\else + \bbl@sreplace\place@tag{\llap}{\bbl@truellap}% + \bbl@sreplace\place@tag@gather{\llap}{\bbl@truellap}% + \bbl@sreplace\place@tag{\rlap}{\bbl@truerlap}% + \bbl@sreplace\place@tag@gather{\rlap}{\bbl@truerlap}% + \fi} +\ifx\AddToHook\@undefined\else + \AddToHook{env/equation/before}{\pardir TLT }{} +\fi \ifx\@eqnnum\@undefined\else \ifx\bbl@attr@dir\@undefined\else - \edef\@eqnnum{{% - \unexpanded{\ifcase\bbl@attr@dir\else\bbl@textdir\@ne\fi}% - \unexpanded\expandafter{\@eqnnum}}} + \bbl@xin@{,leqno,}{,\@classoptionslist,}% + \ifin@ + \bbl@sreplace\@eqnnum{\rlap}{\bbl@leqno@aux} + \def\bbl@leqno@aux#1{% + \bbl@truerlap{% + \ifcase\bbl@attr@dir + #1% + \else + \bbl@textdir\@ne + #1% + \hskip-\displaywidth + \fi}} + \else + \bbl@exp{% + \def\\\@eqnnum{{% + \<ifcase>\\\bbl@attr@dir\<else>\\\bbl@textdir\@ne\<fi>% + \\\bbl@ifsamestring{\\\@currenvir}{equation}% + {}{\\\bbl@truellap}{\[@eqnnum]}}}} + \fi \fi \fi \ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout |