diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
commit | 8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch) | |
tree | 94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/base/mkiv/typo-dig.mkiv | |
parent | f5aed2e51223c36c84c5f25a6cad238b2af59087 (diff) | |
download | context-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz |
2016-01-12 16:26:00
Diffstat (limited to 'tex/context/base/mkiv/typo-dig.mkiv')
-rw-r--r-- | tex/context/base/mkiv/typo-dig.mkiv | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/typo-dig.mkiv b/tex/context/base/mkiv/typo-dig.mkiv new file mode 100644 index 000000000..aa610b3c9 --- /dev/null +++ b/tex/context/base/mkiv/typo-dig.mkiv @@ -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}{1.001} + +\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 + +\unexpanded\def\setdigitsmanipulation[#1]% + {\clf_setdigitsmanipulation{#1}} + +\unexpanded\def\resetdigitsmanipulation + {\attribute\digitsattribute\attributeunsetvalue} + +\appendtoks + \resetdigitsmanipulation +\to \everyresettypesetting + +\unexpanded\def\equaldigits{\groupedcommand{\setdigitsmanipulation[\number\plusone]}{}} +\unexpanded\def\dummydigit {\hphantom {\setdigitsmanipulation[\number\plusone]0}} + +\appendtoks + \resetdigitsmanipulation +\to \everyinitializeverbatim + +\protect \endinput |