summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-06 21:58:15 +0000
committerKarl Berry <karl@freefriends.org>2021-03-06 21:58:15 +0000
commit974640d66e61e81cb197ad96fdff7b08343e4c5a (patch)
tree2e1f75f32f312b7f24ba82b4590ae230bcd6f399 /Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl
parentb4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff)
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl')
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl58
1 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl b/Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl
new file mode 100644
index 00000000000..308ccb66e61
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/typo-dig.mkxl
@@ -0,0 +1,58 @@
+%D \module
+%D [ file=typo-dig,
+%D version=2010.01.18,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Digits,
+%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 Typesetting Macros / Digits}
+
+\unprotect
+
+\registerctxluafile{typo-dig}{autosuffix}
+
+\definesystemattribute[digits][public]
+
+%D This could as well be a dynamic font feature but why bother.
+%D
+%D \macros
+%D {\equaldigits}
+%D
+%D \startbuffer
+%D test test \ruledhbox{123} test test\par
+%D test test \ruledhbox{\equaldigits{123}} test test\par
+%D test test \equaldigits{123} test test\par
+%D \stopbuffer
+%D
+%D \typebuffer
+%D
+%D This calls result in:
+%D
+%D \startlines
+%D \getbuffer
+%D \stoplines
+
+\permanent\protected\def\setdigitsmanipulation[#1]% can be public implementor
+ {\clf_setdigitsmanipulation{#1}}
+
+\permanent\protected\def\resetdigitsmanipulation
+ {\c_attr_digits\attributeunsetvalue}
+
+\appendtoks
+ \resetdigitsmanipulation
+\to \everyresettypesetting
+
+\permanent\protected\def\equaldigits{\groupedcommand{\setdigitsmanipulation[\number\plusone]}{}}
+\permanent\protected\def\dummydigit {\hphantom {\setdigitsmanipulation[\number\plusone]0}}
+
+\appendtoks
+ \resetdigitsmanipulation
+\to \everyinitializeverbatim
+
+\protect \endinput