diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
commit | fc4466b32ed330a956ac603b00fd145524cff49a (patch) | |
tree | 2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv | |
parent | 50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff) |
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv b/Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv new file mode 100644 index 00000000000..2decaa81fc5 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/math-scr.mkiv @@ -0,0 +1,59 @@ +%D \module +%D [ file=math-scr, +%D version=2007.07.19, +%D title=\CONTEXT\ Math Macros, +%D subtitle=Scripts, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Math Macros / Scripts} + +\unprotect + +%D These macros were first needed by Frits (Gajes) Spijker +%D (of the Math4All project that we participate in), and used +%D for typesetting the minus sign that is keyed into scientific +%D calculators. We use the monospaced signs, that we also define +%D as symbol, so that they can be overloaded. + +\def\math_scripts_raised_symbol#1% + {\mathchoice + {\math_scripts_raised_symbol_indeed5\tf {#1}}% + {\math_scripts_raised_symbol_indeed5\tf {#1}}% + {\math_scripts_raised_symbol_indeed4\tx {#1}}% + {\math_scripts_raised_symbol_indeed3\txx{#1}}} + +\def\math_scripts_raised_symbol_indeed#1#2#3% + {\mathord{{#2\raise.#1ex\hbox{#2\symbol[#3]}}}} + +\def\math_scripts_raised_number#1% + {\mathchoice + {\math_scripts_raised_number_indeed\tf {#1}}% + {\math_scripts_raised_number_indeed\tf {#1}}% + {\math_scripts_raised_number_indeed\tx {#1}}% + {\math_scripts_raised_number_indeed\txx{#1}}} + +\def\math_scripts_raised_number_indeed#1#2% + {\setbox\scratchbox\hbox{0}% + \mathord{\hbox to \wd\scratchbox{\hss#1\symbol[#2]\hss}}} + +\definesymbol[positive] [\getglyph{Mono}{+}] +\definesymbol[negative] [\getglyph{Mono}{-}] +\definesymbol[zeroamount][\getglyph{Mono}{-}] + +\unexpanded\def\negative {\math_scripts_raised_symbol{negative}} +\unexpanded\def\positive {\math_scripts_raised_symbol{positive}} +\unexpanded\def\zeroamount{\math_scripts_raised_number{zeroamount}} + +%D How negative such a symbol looks is demonstrated in: +%D $\negative 10^{\negative 10^{\negative 10}}$. + +% \setuptextformulas % why here +% [\c!size=\v!normal] + +\protect \endinput |