diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-02-22 20:29:46 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-02-22 20:29:46 +0100 |
commit | 7b271baae19db1528fbe6621bdf50af89a5a336b (patch) | |
tree | 4fc24a8f2be20aa90e90f6e1bcb62d69f4946235 /tex/context/base/mkiv/char-ini.mkiv | |
parent | 67b9965fe473d18f13ed4c40f1e4e008eb870322 (diff) | |
download | context-7b271baae19db1528fbe6621bdf50af89a5a336b.tar.gz |
2019-02-22 19:43:00
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. |