diff options
Diffstat (limited to 'tex/context/base/mkiv/char-ini.mkiv')
-rw-r--r-- | tex/context/base/mkiv/char-ini.mkiv | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/char-ini.mkiv b/tex/context/base/mkiv/char-ini.mkiv index 9c41df673..0519aaf91 100644 --- a/tex/context/base/mkiv/char-ini.mkiv +++ b/tex/context/base/mkiv/char-ini.mkiv @@ -42,8 +42,8 @@ % use \normalUchar when possible .. the next one is nice for documents and it also accepts % 0x prefixed numbers -\def\utfchar #1{\clf_utfchar \numexpr#1\relax} -\def\safechar#1{\clf_safechar\numexpr#1\relax} +\def\utfchar #1{\clf_utfchar {#1}} +\def\safechar#1{\clf_safechar{#1}} \unexpanded\def\Ux #1{\Uchar\numexpr"#1\relax} % used in xml \def\eUx#1{\Uchar\numexpr"#1\relax} % used in xml @@ -66,6 +66,18 @@ \normalstartimath\char#1\normalstopimath \fi\fi} +\unexpanded\def\textormathchars#1% + {{\font_text_or_mathchars#1\relax}} + +\unexpanded\def\font_text_or_mathchars#1#2\relax + {\relax\ifmmode + #1#2% + \else\iffontchar\font`#1\relax + #1#2\relax + \else + \normalstartimath#1#2\normalstopimath + \fi\fi} + %D The codes are stored in the format, so we don't need to reinitialize %D them (unless of course we have adapted the table). It is on the agenda %D to do this with \type {tex.lccode} cum suis once they're available. |