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