diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/examples/tip/font-cpp.tip |
Initial commit
Diffstat (limited to 'info/examples/tip/font-cpp.tip')
-rw-r--r-- | info/examples/tip/font-cpp.tip | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/info/examples/tip/font-cpp.tip b/info/examples/tip/font-cpp.tip new file mode 100644 index 0000000000..c127d76ed5 --- /dev/null +++ b/info/examples/tip/font-cpp.tip @@ -0,0 +1,45 @@ +% This macro source file is from the four volume series +% "TeX in Practice" by Stephan von Bechtolsheim, published +% 1993 by Springer-Verlag, New York. +% Copyright 1993 Stephan von Bechtolsheim. +% No warranty or liability is assumed. +% This macro may be copied freely if no fees other than +% media cost or shipping charges are charged and as long +% as this copyright and the following source code itself +% is not changed. Please see the series for further information. +% +% Version: 1.0 +% Date: May 1, 1993 +% +% +% This source code is documented in 16.2.11, p. II-283. +% Original source in file "fonts2.TEX", starting line 1007. +\wlog{L: "font-cpp.tip" ["fonts2.TEX," l. 1007, p. II-283]}% +% This file DOES belong to format "texip." +\InputD{leadingz.tip} +\InputD{imodn.tip} +\def\CharactersPerPica #1{% + \setbox0 = \hbox{% + #1\relax + This paragraph has 423 characters. We know that + because we counted it. It is very simple to count, because + the Emacs editor we are using has a function ``advance + by one character.'' And with the prefix command (that's + Emacs terminology) you can execute ``advance by + one character'' 423~times. Now, let's hope that this text + is representative of ordinary text so that our average + number of characters per pica is correct. + }% + {% + \count1 = \wd0 + \divide\count1 by 100 + \count0 = 423 + \multiply\count0 by 65536 + \multiply\count0 by 12 + \divide\count0 by \count1 + \count2 = \count0 + \divide\count2 by 100 + \IModN{\count0}{100}{\count3}% + \the\count2.\LeadingZ{\count3}% + }% +} |