diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-11-23 19:48:34 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-11-23 19:48:34 +0100 |
commit | 18499e46a49b8ccf4346686d1cf626ada33935b8 (patch) | |
tree | bd0ae7b601b323e20954c10c07598637d9403e00 /tex/context/base/mkiv/syst-con.mkxl | |
parent | 4b089e589d39346a66a27d04f9857fe16e4b7b41 (diff) | |
download | context-18499e46a49b8ccf4346686d1cf626ada33935b8.tar.gz |
2020-11-23 18:39:00
Diffstat (limited to 'tex/context/base/mkiv/syst-con.mkxl')
-rw-r--r-- | tex/context/base/mkiv/syst-con.mkxl | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/tex/context/base/mkiv/syst-con.mkxl b/tex/context/base/mkiv/syst-con.mkxl deleted file mode 100644 index ed4a4f3c5..000000000 --- a/tex/context/base/mkiv/syst-con.mkxl +++ /dev/null @@ -1,88 +0,0 @@ -%D \module -%D [ file=syst-con, -%D version=2006.09.16, % real old stuff ... 2000.12.10 -%D title=\CONTEXT\ System Macros, -%D subtitle=Conversions, -%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. - -\registerctxluafile{syst-con}{} - -\unprotect - -%D \macros{lchexnumber,uchexnumber,lchexnumbers,uchexnumbers} -%D -%D In addition to the uppercase hex conversion, as needed in math families, we -%D occasionally need a lowercase one. - -\permanent\def\lchexnumber #1{\clf_lchexnumber \numexpr#1\relax} -\permanent\def\uchexnumber #1{\clf_uchexnumber \numexpr#1\relax} -\permanent\def\lchexnumbers#1{\clf_lchexnumbers\numexpr#1\relax} -\permanent\def\uchexnumbers#1{\clf_uchexnumbers\numexpr#1\relax} - -\aliased\let\hexnumber\uchexnumber - -%D \macros{octnumber} -%D -%D For \UNICODE\ remapping purposes, we need octal numbers. - -\permanent\def\octnumber#1{\clf_octnumber\numexpr#1\relax} - -%D \macros{hexstringtonumber,octstringtonumber} -%D -%D This macro converts a two character hexadecimal number into a decimal number, -%D thereby taking care of lowercase characters as well. - -\permanent\def\hexstringtonumber#1{\clf_hexstringtonumber\numexpr#1\relax} -\permanent\def\octstringtonumber#1{\clf_octstringtonumber\numexpr#1\relax} - -%D \macros{rawcharacter} -%D -%D This macro can be used to produce proper 8 bit characters that we sometimes need -%D in backends and round||trips. - -\permanent\def\rawcharacter#1{\clf_rawcharacter\numexpr#1\relax} - -%D \macros{twodigits, threedigits} -%D -%D These macros provides two or three digits always: - -\permanent\def\twodigits #1{\ifnum #1<10 0\fi\number#1} -\permanent\def\threedigits#1{\ifnum#1<100 \ifnum#1<10 0\fi0\fi\number#1} - -%D \macros{modulonumber} -%D -%D In the conversion macros described in \type {core-con} we need a wrap||around -%D method. The following solution is provided by Taco. -%D -%D The \type {modulonumber} macro expands to the mathematical modulo of a positive -%D integer. It is crucial for it's application that this macro is fully exandable. -%D -%D The expression inside the \type {\numexpr} itself is somewhat bizarre because -%D \ETEX\ uses a rounding division instead of truncation. If \ETEX's division would -%D have behaved like \TEX's normal\type {\divide}, then the expression could have -%D been somewhat simpler, like \type {#2-(#2/#1)*#1}. This works just as well, but a -%D bit more complex. - -%permanent\def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax} -%permanent\def\modulonumber#1#2{\the\numexpr#2-(#2:#1)*#1\relax} - -%D \macros{setcalculatedsin,setcalculatedcos,setcalculatedtan} - -\permanent\protected\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}} -\permanent\protected\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}} -\permanent\protected\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}} - -%D \macros{formatted,format} - -\permanent \def\formatted#1{\ctxcommand{format(#1)}} % not clf -\permanent\protected\def\format #1{\ctxcommand{format(#1)}} % not clf - -%D The \type {\modulatednumber} and \type {\realnumber} macros have been removed. - -\protect \endinput |