\newdimen\txtwdth  \newdimen\sht  \newdimen\shw  \newbox\shbox
\newdimen\sboxsep  \newdimen\sboxrule  \newdimen\sdim
\sboxsep  = 10pt
\sdim     = 3pt
\sboxrule = 0.5pt
\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
             \hbox{\copy\shbox\vrule width\sdim height\sht}
             \hbox{\kern\sdim\vrule height\sdim width \wd\shbox}}}
