%%% ====================================================================== %%% @LaTeX-style{ %%% filename = "shadow.sty", %%% version = "1.2", %%% date = "14 September 1994", %%% time = "11:32:22.56 CST", %%% author = "Mauro Orlandini", %%% address = "TeSRE Institute/CNR %%% Area della Ricerca di Bologna %%% Via Gobetti 101 %%% 40129 Bologna, Italy", %%% e-mail = "orlandini@botes1.tesre.bo.cnr.it (Internet) %%% 38045::ORLANDINI (DECnet)", %%% telephone = "+39 51 639-8667", %%% FAX = "+39 51 639-8723", %%% supported = "yes", %%% archived = "SHSU*, ymir", %%% keywords = "LaTeX", %%% abstract = "The command \shabox has the same meaning of the %%% LaTeX command \fbox except for the fact that a %%% "shadow" is added to the bottom and the right side %%% of the box. It computes the right dimension of the %%% box, even if the text spans over more than one %%% line; in this case a warning messagge is given.", %%% codetable = "ISO/ASCII", %%% checksum = "20003 84 403 4299", %%% docstring = "There are three parameters governing: %%% 1. the width of the lines delimiting the box: %%% \sboxrule %%% 2. the separation between the edge of the box and %%% its contents: \sboxsep %%% 3. the dimension of the shadow: \sdim %%% Sintax: \shabox{} %%% where is the text to be put in the %%% framed box. It can be an entire paragraph. %%% Adapted from the file dropshadow.tex by %%% drstrip@cd.sandia.gov. %%% V1.1 Works in a double column environment. %%% V1.2 When there is an online shadow box, it %%% will be centered on the line (in V1.1 the %%% box was aligned with the baseline). %%% (Courtesy by Mike Piff)", %%% %%% The checksum field above contains a CRC-16 %%% checksum as the first value, followed by the %%% equivalent of the standard UNIX wc (word %%% count) utility output of lines, words, and %%% characters. This is produced by Robert %%% Solovay's checksum utility." %%% } %%% ====================================================================== % \typeout{Style Option: `shadow' v1.2 <14 September 1994> (M.O.)} \newdimen\txtwdth \newdimen\sht \newdimen\shw \newbox\shbox \newdimen\sboxsep \newdimen\sboxrule \newdimen\sdim \sboxsep = 10pt \sdim = 4pt \sboxrule = .4pt \def\shabox#1{\setbox\@tempboxa\hbox{#1} \shw\wd\@tempboxa \if@twocolumn\txtwdth\columnwidth\else\txtwdth\textwidth\fi \ifdim\shw<\txtwdth \leavevmode\setbox\@tempboxa\hbox{#1} \else \typeout{Shadow Warning: Box dimension greater than textwidth.} \setbox\@tempboxa\vbox{\hsize\txtwdth\advance\hsize-2\sboxsep \advance\hsize-2\sboxrule \advance\hsize-2\sdim \advance\hsize-15pt#1} \fi \setbox\shbox\hbox{\@tempdima\sboxrule \advance\@tempdima \sboxsep \advance\@tempdima \dp\@tempboxa \hbox{\lower \@tempdima\hbox {\vbox{\hrule \@height \sboxrule \hbox{\vrule \@width \sboxrule \hskip\sboxsep \vbox{\vskip\sboxsep \box\@tempboxa\vskip\sboxsep}\hskip \sboxsep\vrule \@width \sboxrule} \hrule \@height \sboxrule}}}} \sht\ht\shbox \advance\sht-\sdim \leavevmode\vbox{\baselineskip0pt\lineskip0pt\vtop{%% V1.2 %% Added \vtop %% From M.Piff \hbox{\copy\shbox\vrule width\sdim height\sht} \hbox{\kern\sdim\vrule height\sdim width \wd\shbox}}}} \endinput