diff options
Diffstat (limited to 'tex/context/base/mkiv/math-rad.mkvi')
-rw-r--r-- | tex/context/base/mkiv/math-rad.mkvi | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/math-rad.mkvi b/tex/context/base/mkiv/math-rad.mkvi index c640e768e..c279c3526 100644 --- a/tex/context/base/mkiv/math-rad.mkvi +++ b/tex/context/base/mkiv/math-rad.mkvi @@ -26,12 +26,24 @@ % \def\rootradical{\Uroot \defaultmathfamily "221A } % can be done in char-def % \def\surdradical{\Uradical \defaultmathfamily "221A } % can be done in char-def -\def\root#1\of{\rootradical{#1}} % #2 +\unexpanded\def\root#1\of{\rootradical{#1}} % #2 \unexpanded\def\sqrt{\doifelsenextoptionalcs\rootwithdegree\rootwithoutdegree} -\unexpanded\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird - {\normalexpanded{\rootradical{\normalunexpanded{#1}}{\noexpand\triggermathstyle{\normalmathstyle}\normalunexpanded{#2}}}} +\ifcase \contextlmtxmode + + \unexpanded\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird + {\normalexpanded{\rootradical + {\normalunexpanded{#1}}% + {\noexpand\triggermathstyle{\number\normalmathstyle}% + \normalunexpanded{#2}}}} + +\else % experimental new keyword: (maybe keywords should come after the symbol) + + \unexpanded\def\styledrootradical#1#2% so that \text works ok ... \rootradical behaves somewhat weird + {\Uroot style \normalmathstyle "0 "221A {#1}{#2}} + +\fi \unexpanded\def\rootwithdegree[#1]{\rootradical{#1}} \unexpanded\def\rootwithoutdegree {\rootradical {}} |