summaryrefslogtreecommitdiff
path: root/tex/context/base/x-mathml.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/x-mathml.mkiv')
-rw-r--r--tex/context/base/x-mathml.mkiv54
1 files changed, 37 insertions, 17 deletions
diff --git a/tex/context/base/x-mathml.mkiv b/tex/context/base/x-mathml.mkiv
index f64fdbc74..0848c1754 100644
--- a/tex/context/base/x-mathml.mkiv
+++ b/tex/context/base/x-mathml.mkiv
@@ -2071,26 +2071,46 @@
\xmlflush{#1}
\stopxmlsetups
+% \startxmlsetups mml:mrow
+% \begingroup
+% \edef\nofmmlrows{\xmlcount{#1}{/mml:mo}}%
+% \ifnum\nofmmlrows=\plustwo
+% \xmldoifelse {#1} {/mml:mo[position()==1 or position()==\nofmmlrows]} {% we need a {}
+% \def\MMLleft {\left }
+% \def\MMLright {\right}
+% \def\MMLmiddle{\middle}
+% \enabledelimiter
+% \checkdelimiters{\xmlall{#1}{/mml:mo}}
+% \fakeleftdelimiter
+% \xmlflush{#1}
+% \fakerightdelimiter
+% \disabledelimiter
+% } {
+% \xmlflush{#1}
+% }
+% \else
+% \xmlflush{#1}
+% \fi
+% \endgroup
+% \stopxmlsetups
+%
+% fails on { ... so we need
+
\startxmlsetups mml:mrow
\begingroup
- \edef\nofmmlrows{\xmlcount{#1}{/mml:mo}}%
- \ifnum\nofmmlrows=\plustwo
- \xmldoifelse {#1} {/mml:mo[position()==1 or position()==\nofmmlrows]} {% we need a {}
- \def\MMLleft {\left }
- \def\MMLright {\right}
- \def\MMLmiddle{\middle}
- \enabledelimiter
- \checkdelimiters{\xmlall{#1}{/mml:mo}}
- \fakeleftdelimiter
- \xmlflush{#1}
- \fakerightdelimiter
- \disabledelimiter
- } {
- \xmlflush{#1}
- }
- \else
+ \xmldoifelse {#1} {/mml:mo[first() or last()]} {% we need a {}
+ \def\MMLleft {\left }
+ \def\MMLright {\right}
+ \def\MMLmiddle{\middle}
+ \enabledelimiter
+ \checkdelimiters{\xmlall{#1}{/mml:mo}}
+ \fakeleftdelimiter
\xmlflush{#1}
- \fi
+ \fakerightdelimiter
+ \disabledelimiter
+ } {
+ \xmlflush{#1}
+ }
\endgroup
\stopxmlsetups