]> AND Private Git Repository - ThesisAli.git/blob - dropping.sty
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
update 3
[ThesisAli.git] / dropping.sty
1 %%
2 %% This is file `dropping.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% dropping.dtx  (with options: `paketkod')
8 %% 
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.
12 %% 
13 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
14 \ProvidesPackage{dropping}[1997/06/12 v.0.12]
15 \newcount\bigscale
16 \newcount\down
17 \newdimen\saveunitlength
18 \newdimen\wantedheight
19 \newif\ifstrtcmmnd \strtcmmndfalse
20 \DeclareOption{dvips}{%
21 \newcount\wantedcount
22 \newcount\actualcount%
23 \newdimen\actualheight%
24 \def\findsize#1#2{%
25 \bigscale=1000%
26 \font\BIG=#1 scaled \bigscale%
27 \setbox0=\hbox{\BIG #2\/}%
28 \actualheight=\ht0%
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{%
39 \bigscale=#3%
40 \font\BIG=#1 scaled \bigscale%
41 \setbox0=\hbox{\BIG #2\/}}%
42 \def\findsize#1#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}%
56 \fi\fi\fi\fi\fi\fi}}
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}}
80 \ProcessOptions
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%
87 \findsize{#3}{#4}%
88 \hangindent=\wd0 \advance\hangindent by #1%
89 \hangafter=-#2%
90 \ifdim\dp0>0.25\baselineskip%
91  \loop\ifdim\dp0>\baselineskip
92   \advance\baselineskip by \baselineskip
93   \advance\hangafter by -1
94  \repeat
95  \advance\hangafter by -1
96  \baselineskip=\unitlength
97 \fi%
98 \noindent%
99 \down=-#2 \advance\down by 1%
100 \begin{picture}(0,0)%
101 \put(0,\down){\makebox(0,0)[br]{\box0}}%
102 \end{picture}%
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{%
109   \ifnum`#1=`\\
110     \global\strtcmmndtrue
111   \else
112     \global\strtcmmndfalse
113   \fi
114 }
115 \newcommand{\dropping}[3][0pt]{%
116 \get@external@font%
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{}
124 \spltatspc}
125 \def\spltslsk{#3}%
126 \isit{#3}%
127 \ifstrtcmmnd
128 \spltstrng\spltslsk%
129 \let\xprt@rgfr\strngtw
130 \else
131 \def\xprt@rgfr{#3}
132 \fi
133 \protect\bigdrop{#1}{#2}{\xprt@rgtr}{\xprt@rgfr}%
134 }
135 \endinput
136 %%
137 %% End of file `dropping.sty'.