From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- info/examples/tip/graphmac.tip | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 info/examples/tip/graphmac.tip (limited to 'info/examples/tip/graphmac.tip') diff --git a/info/examples/tip/graphmac.tip b/info/examples/tip/graphmac.tip new file mode 100644 index 0000000000..6cf2ba10d9 --- /dev/null +++ b/info/examples/tip/graphmac.tip @@ -0,0 +1,82 @@ +% 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 9.2.1, p. I-314. +% Original source in file "boxit.TEX", starting line 79. +\wlog{L: "graphmac.tip" ["boxit.TEX," l. 79, p. I-314]}% +% This file DOES belong to format "texip." +\InputD{box-zero.tip} +\catcode`\@ = 11 +\newdimen\@ScaleLength +\def\SetScale #1{% + \@ScaleLength = #1 +} +\SetScale{1mm} +\newdimen\@LineThickness +\def\SetLineThickness #1{% + \@LineThickness = #1 +} +\SetLineThickness{0.3mm} +\newbox\@GraphDataBox +\def\SetGraphDataBox #1{% + \dimen0 = #1% + \setbox\@GraphDataBox = + \hbox{% + \hskip -0.5\dimen0 + \vrule height 0.5\dimen0 + depth 0.5\dimen0 + width 1.0\dimen0 + }% + \ZeroBox{\@GraphDataBox}% +} +\SetGraphDataBox{2mm} +\def\DrawDataBox (#1,#2){% + {% + \setbox0 = \hbox{% + \hskip #1\@ScaleLength + \raise #2\@ScaleLength\copy\@GraphDataBox + }% + \ZeroBoxOut{0}% + }% +} +\def\DrawHLine (#1,#2)#3{% + {% + \setbox0 = \hbox{% + \hskip #1\@ScaleLength + \raise #2\@ScaleLength + \hbox{% + \vrule height 0.5\@LineThickness + depth 0.5\@LineThickness + width #3\@ScaleLength + }% + }% + \ZeroBoxOut{0}% + }% +} +\def\DrawVLine (#1,#2)#3{% + {% + \setbox0 = \hbox{% + \hskip #1\@ScaleLength + \hskip -0.5\@LineThickness + \raise #2\@ScaleLength + \hbox{% + \vrule height #3\@ScaleLength + depth 0pt + width \@LineThickness + }% + }% + \ZeroBoxOut{0}% + }% +} +\catcode`\@ = 12 -- cgit v1.2.3