Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/latex/misc/shadow.sty

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


%%% ======================================================================
%%%  @LaTeX-style-file{
%%%     filename        = "shadow.sty",
%%%     version         = "1.2.1",
%%%     date            = "16 September 1996",
%%%     time            = "16:26:21.52 MET",
%%%     author          = "Mauro Orlandini",
%%%     address         = "TeSRE Institute/CNR 
%%%                        Area della Ricerca di Bologna
%%%                        Via Gobetti 101
%%%                        40129 Bologna - Italy",
%%%     Email           = "[email protected] (Internet)
%%%                        38045::ORLANDINI (DECnet)",
%%%     telephone       = "+39 51 639-8667",
%%%     FAX             = "+39 51 639-8723",
%%%     supported       = "yes",
%%%     archived        = "TeX archive",
%%%     keywords        = "shadow",
%%%     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        = "15806 84 430 4506",
%%%     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{<text>}
%%%                          where <text> is the text to be put in the
%%%                          framed box. It can be an entire paragraph.
%%%                          Adapted from the file dropshadow.tex by
%%%                          [email protected].
%%%                          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)
%%%                        V1.2.1  Dropped of unwanted CRs by Ralf Nitsch
%%%                        
%%%                        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.1 <16 September 1996> (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}% <-- V1.2.1 Added by R. Nitsch
\shw\wd\@tempboxa
\if@twocolumn\txtwdth\columnwidth\else\txtwdth\textwidth\fi
\ifdim\shw<\txtwdth
  \leavevmode\setbox\@tempboxa\hbox{#1}% <-- V1.2.1 Added by R. Nitsch
\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}}}}% <-- V1.2.1 Added by R. Nitsch
\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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].