2 %% This is file `dropping.sty',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% dropping.dtx (with options: `paketkod')
9 %% Copyright (c) 1996-97 by Mats Dahlgren <matsd@homenet.se>.
10 %% All rights reserved. See the file `dropping.ins' for information
11 %% on how you may (re-)distribute the `dropping' package files.
13 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
14 \ProvidesPackage{dropping}[1997/06/12 v.0.12]
17 \newdimen\saveunitlength
18 \newdimen\wantedheight
19 \newif\ifstrtcmmnd \strtcmmndfalse
20 \DeclareOption{dvips}{%
22 \newcount\actualcount%
23 \newdimen\actualheight%
26 \font\BIG=#1 scaled \bigscale%
27 \setbox0=\hbox{\BIG #2\/}%
29 \wantedcount=\wantedheight \actualcount=\actualheight%
30 \advance\actualcount by 50%
31 \divide\actualcount by 100%
32 \multiply\wantedcount by 10%
33 \divide\wantedcount by \actualcount%
34 \font\BIG=#1 scaled \wantedcount%
35 \setbox0=\hbox{\BIG #2\/}%
36 \bigscale=\wantedcount}}
37 \DeclareOption{other}{%
38 \def\nextmagstep#1#2#3{%
40 \font\BIG=#1 scaled \bigscale%
41 \setbox0=\hbox{\BIG #2\/}}%
43 \nextmagstep{#1}{#2}{\magstep0}%
44 \ifdim\ht0<\wantedheight%
45 \nextmagstep{#1}{#2}{\magstephalf}%
46 \ifdim\ht0<\wantedheight%
47 \nextmagstep{#1}{#2}{\magstep1}%
48 \ifdim\ht0<\wantedheight%
49 \nextmagstep{#1}{#2}{\magstep2}%
50 \ifdim\ht0<\wantedheight%
51 \nextmagstep{#1}{#2}{\magstep3}%
52 \ifdim\ht0<\wantedheight%
53 \nextmagstep{#1}{#2}{\magstep4}%
54 \ifdim\ht0<\wantedheight%
55 \nextmagstep{#1}{#2}{\magstep5}%
57 \DeclareOption{xdvi}{\ExecuteOptions{dvips}}
58 \DeclareOption{dvipsone}{\ExecuteOptions{other}}
59 \DeclareOption{dviwindo}{\ExecuteOptions{other}}
60 \DeclareOption{emtex}{\ExecuteOptions{other}}
61 \DeclareOption{dviwin}{\ExecuteOptions{other}}
62 \DeclareOption{oztex}{\ExecuteOptions{dvips}}
63 \DeclareOption{textures}{\ExecuteOptions{other}}
64 \DeclareOption{pctexps}{\ExecuteOptions{other}}
65 \DeclareOption{pctexwin}{\ExecuteOptions{other}}
66 \DeclareOption{pctexhp}{\ExecuteOptions{other}}
67 \DeclareOption{dvi2ps}{\ExecuteOptions{other}}
68 \DeclareOption{dvialw}{\ExecuteOptions{other}}
69 \DeclareOption{dvilaser}{\ExecuteOptions{other}}
70 \DeclareOption{dvitops}{\ExecuteOptions{other}}
71 \DeclareOption{psprint}{\ExecuteOptions{other}}
72 \DeclareOption{pubps}{\ExecuteOptions{other}}
73 \DeclareOption{ln}{\ExecuteOptions{other}}
74 \DeclareOption*{\ExecuteOptions{other}}
75 \InputIfFileExists{graphics.cfg}{}{%
76 \PackageWarningNoLine{dropping}{%
77 You have no `graphics.cfg' file installed.\MessageBreak
78 I will assume you are using `dvips'}
79 \ExecuteOptions{dvips}}
81 \def\bigdrop#1#2#3#4{%
82 \saveunitlength=\unitlength%
83 \unitlength=\baselineskip%
84 \setbox1=\hbox{\the\font I}%
85 \wantedheight=#2\baselineskip \advance\wantedheight by -\baselineskip%
86 \advance\wantedheight by \ht1%
88 \hangindent=\wd0 \advance\hangindent by #1%
90 \ifdim\dp0>0.25\baselineskip%
91 \loop\ifdim\dp0>\baselineskip
92 \advance\baselineskip by \baselineskip
93 \advance\hangafter by -1
95 \advance\hangafter by -1
96 \baselineskip=\unitlength
99 \down=-#2 \advance\down by 1%
100 \begin{picture}(0,0)%
101 \put(0,\down){\makebox(0,0)[br]{\box0}}%
103 \unitlength=\saveunitlength}
104 \def\spltatspc#1 #2\spltatspc{#1}
105 \def\spltstrng#1{\expandafter\@split#1\end}
106 \def\@split#1 #2\end{\def\strngn{#1}\def\strngtw{#2}}
107 \def\isit#1{\expandafter\@isit\string#1\@null}
108 \def\@isit#1#2\@null{%
110 \global\strtcmmndtrue
112 \global\strtcmmndfalse
115 \newcommand{\dropping}[3][0pt]{%
117 \edef\n@vf@nt{\expandafter\spltatspc\external@font \spltatspc}%
118 \setbox8=\hbox{#3\get@external@font%
119 \global\let\external@font@export\external@font%
120 \edef\n@vf@ntb@x{\expandafter\spltatspc\external@font \spltatspc}%
121 \global\let\n@vf@nt\n@vf@ntb@x}%
122 \let\external@font\external@font@export%
123 \edef\xprt@rgtr{\expandafter\spltatspc\external@font\expandafter{}
129 \let\xprt@rgfr\strngtw
133 \protect\bigdrop{#1}{#2}{\xprt@rgtr}{\xprt@rgfr}%
137 %% End of file `dropping.sty'.