summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/math-fen.mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-08 21:30:04 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-08-08 21:30:04 +0200
commit0e99988c85616897aa99e28c4f00d596d677f5ab (patch)
tree743d9039ab43aab9ad4e2881b47ce9e854986567 /tex/context/base/mkiv/math-fen.mkiv
parent96f283b0d4f0259b7d7d1c64d1d078c519fc84a6 (diff)
downloadcontext-0e99988c85616897aa99e28c4f00d596d677f5ab.tar.gz
2016-08-08 21:06:00
Diffstat (limited to 'tex/context/base/mkiv/math-fen.mkiv')
-rw-r--r--tex/context/base/mkiv/math-fen.mkiv28
1 files changed, 25 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/math-fen.mkiv b/tex/context/base/mkiv/math-fen.mkiv
index 81e39723d..8d004636f 100644
--- a/tex/context/base/mkiv/math-fen.mkiv
+++ b/tex/context/base/mkiv/math-fen.mkiv
@@ -54,17 +54,39 @@
% we need the direct use of \Udelimiter because of { etc
-\def\math_fenced_left {\edef\p_left{\mathfenceparameter\c!left}%
+\newconditional\c_math_fenced_mirror \settrue\c_math_fenced_mirror
+
+\def\math_fenced_left {\edef\p_left
+ {\ifconditional\c_math_fenced_mirror
+ \ifcase\c_math_bidi
+ \mathfenceparameter\c!left
+ \else
+ \mathfenceparameter\c!right
+ \fi
+ \else
+ \mathfenceparameter\c!left
+ \fi}%
\math_fenced_color_push
\normalleft\ifx\p_left\empty.\else\Udelimiter\plusfour\fam\p_left\relax\fi
\math_fenced_color_pop}
+
\def\math_fenced_middle{\edef\p_middle{\mathfenceparameter\c!middle}%
\mskip\thinmuskip
\math_fenced_color_push
\normalmiddle\ifx\p_middle\empty.\else\Udelimiter\plusfour\fam\p_middle\relax\fi
\math_fenced_color_pop
\mskip\thinmuskip}
-\def\math_fenced_right {\edef\p_right{\mathfenceparameter\c!right}%
+
+\def\math_fenced_right {\edef\p_right
+ {\ifconditional\c_math_fenced_mirror
+ \ifcase\c_math_bidi
+ \mathfenceparameter\c!right
+ \else
+ \mathfenceparameter\c!left
+ \fi
+ \else
+ \mathfenceparameter\c!right
+ \fi}%
\math_fenced_color_push
\normalright\ifx\p_right\empty.\else\Udelimiter\plusfive\fam\p_right\relax\fi
\math_fenced_color_pop}
@@ -470,7 +492,7 @@
\installcorenamespace{mathbig}
\unexpanded\def\choosemathbig#1#2% so we accept \big{||} as well
- {{\hbox\bgroup
+ {{\naturalhbox\bgroup
\startimath
\ifcase\bigmathdelimitermethod
\math_fenced_step#2\relax