summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/syst-aux.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-09-28 11:20:59 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-09-28 11:20:59 +0200
commit164a98ac4e58ae88de0a83d1eb60583827f4fbab (patch)
treea9bb80667dcf2dacc511b7c0dd0439e3ece7c274 /tex/context/base/mkiv/syst-aux.mkiv
parente5c13c74b45e08527dda1d1be1788cccd96b6dac (diff)
downloadcontext-164a98ac4e58ae88de0a83d1eb60583827f4fbab.tar.gz
2017-09-28 10:13:00
Diffstat (limited to 'tex/context/base/mkiv/syst-aux.mkiv')
-rw-r--r--tex/context/base/mkiv/syst-aux.mkiv44
1 files changed, 25 insertions, 19 deletions
diff --git a/tex/context/base/mkiv/syst-aux.mkiv b/tex/context/base/mkiv/syst-aux.mkiv
index 5fd515da9..dcad3b873 100644
--- a/tex/context/base/mkiv/syst-aux.mkiv
+++ b/tex/context/base/mkiv/syst-aux.mkiv
@@ -6111,40 +6111,46 @@
%D \macros
%D {ScaledPointsToBigPoints,ScaledPointsToWholeBigPoints}
%D
-%D One characteristic of \POSTSCRIPT\ and \PDF\ is that both
-%D used big points (\TEX's bp). The next macros convert points
-%D and scaled points into big points.
+%D One characteristic of \POSTSCRIPT\ and \PDF\ is that both used big points (\TEX's
+%D bp). The next macros convert points and scaled points into big points. The magic
+%D factor $72/72.27$ can be found in most \TEX\ related books.
%D
%D \starttyping
%D \ScaledPointsToBigPoints {number} \target
%D \ScaledPointsToWholeBigPoints {number} \target
%D \stoptyping
%D
-%D The magic factor $72/72.27$ can be found in most \TEX\
-%D related books.
-% \PointsToBigPoints{10.53940pt}\test \test
-% \PointsToBigPoints{10.53941pt}\test \test
-% \PointsToBigPoints{10.53942pt}\test \test
+%D In pure \TEX:
-% \PointsToWholeBigPoints{10.53940pt}\test \test
-% \PointsToWholeBigPoints{10.53941pt}\test \test
-% \PointsToWholeBigPoints{10.53942pt}\test \test
+% \unexpanded\def\PointsToBigPoints#1#2%
+% {\edef#2{\withoutpt\the\dimexpr.996264\dimexpr#1\relax\relax}}
+%
+% \unexpanded\def\PointsToWholeBigPoints#1#2%
+% {\edef#2{\the\numexpr\dimexpr.996264\dimexpr#1\relax\relax/\maxcard\relax}}
+%
+% \unexpanded\def\ScaledPointsToBigPoints#1% % #2
+% {\PointsToBigPoints{\number#1\scaledpoint}} % {#2}
+%
+% \unexpanded\def\ScaledPointsToWholeBigPoints#1% % #2
+% {\PointsToWholeBigPoints{\number#1\scaledpoint}} % {#2}
-\unexpanded\def\PointsToBigPoints#1#2%
- {\edef#2{\withoutpt\the\dimexpr.996264\dimexpr#1\relax\relax}}
+%D This is slower but cleaner and more accurate too. The only place these are still
+%D used is in a few backend related macros.
-\unexpanded\def\PointsToWholeBigPoints#1#2%
- {\edef#2{\the\numexpr\dimexpr.996264\dimexpr#1\relax\relax/\maxcard\relax}}
+\let\tobigpoints \clf_tobigpoints
+\let\towholebigpoints\clf_towholebigpoints
-\unexpanded\def\ScaledPointsToBigPoints #1{\PointsToBigPoints {\number#1\scaledpoint}}
-\unexpanded\def\ScaledPointsToWholeBigPoints#1{\PointsToWholeBigPoints{\number#1\scaledpoint}}
+\unexpanded\def\PointsToBigPoints #1#2{\edef#2{\tobigpoints #1}} % can be avoided
+\unexpanded\def\PointsToWholeBigPoints #1#2{\edef#2{\towholebigpoints#1}} % can be avoided
+\unexpanded\def\ScaledPointsToBigPoints #1#2{\edef#2{\tobigpoints #1\scaledpoint}} % obsolete
+\unexpanded\def\ScaledPointsToWholeBigPoints#1#2{\edef#2{\towholebigpoints#1\scaledpoint}} % obsolete
%D \macros
%D {PointsToReal}
%D
-%D Points can be stripped from their suffix by using
-%D \type{\withoutpt}. The next macro enveloppes this macro.
+%D Points can be stripped from their suffix by using \type {\withoutpt}. The next
+%D macro enveloppes this macro.
%D
%D \starttyping
%D \PointsToReal {dimension} \target