summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/shadbox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:06:37 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:06:37 +0000
commit76b1084fa62a780b6e6d2b5196886300e04f51a5 (patch)
tree0cc3689f8a0776cc157cb18f1d9a3b5c3eca28f8 /Master/texmf-dist/tex/latex/shadbox
parent5e86844af22f0d3782fc31e5379039fbd8ee63d3 (diff)
shadbox
git-svn-id: svn://tug.org/texlive/trunk@1313 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/shadbox')
-rw-r--r--Master/texmf-dist/tex/latex/shadbox/shadbox.sty65
-rw-r--r--Master/texmf-dist/tex/latex/shadbox/shadbox1.sty71
2 files changed, 136 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/shadbox/shadbox.sty b/Master/texmf-dist/tex/latex/shadbox/shadbox.sty
new file mode 100644
index 00000000000..06adf55fa17
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/shadbox/shadbox.sty
@@ -0,0 +1,65 @@
+% shadbox.sty
+%
+% 17 Mar 1996
+% Glazkov D.A.
+% e-mail: glazkov@sci.lpi.msk.su
+%
+% 117924 Moscow, Leninsky Prosp. 53
+% P.N.Lebedev Physical Institute of
+% Russian Academy of Sciences
+% RUSSIA
+%
+%
+%
+% The goal of this command is to darken the background of any box -
+% text, figure, table etc. In the contrast to PostScript drivers,
+% DVIWIN etc. there is not used any driver-specific properties, but
+% standard Plain(La) TeX. Small black squares is places in the area
+% of the box. The dimension of black square (length \deltablack) may be
+% set by any means (\setlength). But it's reasonable to choose
+% this dimension little greater than dimension of point of the
+% output printer. By default it is equal to 0.3pt, that is suitable
+% for the printer of 300 dpi.
+%
+% The degree of darkness is regulated by means of change the distance
+% between small black squares. In this style squares are placed in the
+% rectangular order - it's simpler, but result is not always very good.
+% - See the style "shadbox1.sty".
+%
+% The retribution for driver-independence is: the less squares and
+% nearer to each other, the greater the size of output DVI-file (and
+% grows quickly). One must experiment to find balance between quality
+% of shadow and size of output file.
+%
+%
+%
+% You may change this code freely. But please inform me if you use
+% or improve these commands.
+%
+%
+%
+% Usage:
+%
+% \shadbox{x}{abc}
+%
+% x - ratio showing how many times the distance between squares
+% greater than their size (may be only >1). 1 corresponds
+% to black darkness, 2 corresponds to 50% darkness.
+%
+% abc - the box, which must be darken
+%
+
+\newdimen\deltablack
+\deltablack=0.3pt
+\def\shadbox#1#2{%
+\newdimen\delt \delt=#1\deltablack
+\setbox2=\hbox{#2}
+%
+\setbox3=\hbox{\vrule width\deltablack height\deltablack depth0pt}
+\wd3=\delt \ht3=\delt
+\setbox4=\vbox to\ht2{\leaders\copy3\vfil\hrule width 0pt
+ height-\dp2 depth\dp2}
+\setbox5=\hbox to\wd2{\leaders\copy4\hfil}
+\wd5=0pt \ht5=0pt \dp5=0pt
+\leavevmode\box5\box2%
+} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/shadbox/shadbox1.sty b/Master/texmf-dist/tex/latex/shadbox/shadbox1.sty
new file mode 100644
index 00000000000..872cab60045
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/shadbox/shadbox1.sty
@@ -0,0 +1,71 @@
+% shadbox1.sty
+%
+% 17 Mar 1996
+% Glazkov D.A.
+% e-mail: glazkov@sci.lpi.msk.su
+%
+% 117924 Moscow, Leninsky Prosp. 53
+% P.N.Lebedev Physical Institute of
+% Russian Academy of Sciences
+% RUSSIA
+%
+%
+%
+% The goal of this command is to darken the background of any box -
+% text, figure, table etc. In the contrast to PostScript drivers,
+% DVIWIN etc. there is not used any driver-specific properties, but
+% standard Plain(La) TeX. Small black squares is places in the area
+% of the box. The dimension of black square (length \deltablack) may be
+% set by any means (\setlength). But it's reasonable to choose
+% this dimension little greater than dimension of point of the
+% output printer. By default it is equal to 0.3pt, that is suitable
+% for the printer of 300 dpi.
+%
+% The degree of darkness is regulated by means of change the distance
+% between small black squares. In this style squares are placed in the
+% "chess" order - the result is better than those in the style
+% "shadbox.sty".
+%
+% The retribution for driver-independence is: the less squares and
+% nearer to each other, the greater the size of output DVI-file (and
+% grows quickly). One must experiment to find balance between quality
+% of shadow and size of output file.
+%
+%
+%
+% You may change this code freely. But please inform me if you use
+% or improve these commands.
+%
+%
+%
+% Usage:
+%
+% \shadbox{x}{abc}
+%
+% x - ratio showing how many times the distance between squares
+% greater than their size (may be only >1). 1 corresponds
+% to black darkness, 2 corresponds to 50% darkness.
+%
+% abc - the box, which must be darken
+%
+%
+\newdimen\deltablack
+\deltablack=0.3pt
+\def\shadbox#1#2{%
+\newdimen\delt \delt=#1\deltablack
+\setbox2=\hbox{#2}
+%
+\setbox3=\hbox{\vrule width\deltablack height\deltablack depth0pt}
+\wd3=\delt \ht3=2\delt
+\setbox4=\vbox to\ht2{\leaders\copy3\vfil\hrule width 0pt
+ height-\dp2 depth\dp2}
+\setbox3=\hbox{\hbox{}\raise\delt\hbox{\vrule width\deltablack
+ height\deltablack depth0pt}}
+\wd3=\delt \ht3=2\delt \dp3=0pt
+\setbox6=\vbox to\ht2{\leaders\copy3\vfil\hrule width 0pt
+ height-\dp2 depth\dp2}
+\setbox7=\hbox{\box4\box6}
+\setbox5=\hbox to\wd2{\leaders\copy7\hfil}
+\wd5=0pt \ht5=0pt \dp5=0pt
+\leavevmode\box5\box2%
+} \ No newline at end of file