summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/shade
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-07-10 00:05:25 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-07-10 00:05:25 +0000
commit4c11983ed7fc5d08cbae55b24870b6f0c5e7479d (patch)
treef34bc9b6d1a01af8528448c66a0bf360f7bd7da4 /Master/texmf-dist/tex/generic/shade
parentfa32c1b0bfe9d3999447f9eedc73c88003a6b6e1 (diff)
New generic package shade in collection-genericextra, replacing shade.sty from
genmisc. (OOPS: forgot to commit some files. See r14264 for these files.) git-svn-id: svn://tug.org/texlive/trunk@14213 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/shade')
-rw-r--r--Master/texmf-dist/tex/generic/shade/shade.tex51
1 files changed, 51 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/shade/shade.tex b/Master/texmf-dist/tex/generic/shade/shade.tex
new file mode 100644
index 00000000000..ea7265fefc0
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/shade/shade.tex
@@ -0,0 +1,51 @@
+%%% SHADE.tex or SHADE.sty
+%%% Macros for use with font SHADE
+%%% -------------------------------------------------------------------------
+%%% Version 1 - March 21, 1993
+%%% Peter Schmitt, Institute of Mathematics, University of Vienna
+%%% Strudlhofgasse 4, A-1090 Wien, Austria
+%%% e-mail A8131DAL@helios.edvz.univie.ac.at
+%%% schmitt@awirap.bitnet
+%%% -------------------------------------------------------------------------
+
+\catcode`\:11
+
+\font\grey:=shade at 10truept
+
+\newbox\shade:box
+\newdimen\fill:boundary
+ \setbox0=\hbox{\grey:\char0\relax}\fill:boundary=\ht0
+\newcount\fill:level \newdimen\fill:size \newdimen\fill:goal
+
+\long\def\shade#1{\leavevmode
+ \setbox\shade:box=\hbox{#1}%
+ \def\shade:column{}\def\shade:row{}%
+ \fill:level=5 \fill:goal=\wd\shade:box
+ \advance\fill:goal by 2\fill:boundary
+ \let\shade:v\relax \Fill: \shade:row\shade:v
+ \fill:level=5
+ \fill:goal=\ht\shade:box \advance\fill:goal by \dp\shade:box
+ \advance\fill:goal by 2\fill:boundary
+ \let\shade:h\relax \Fill: \shade:column\shade:h
+ \fill:goal=\ht\shade:box \advance\fill:goal by \dp\shade:box
+ \setbox0=\vbox to\fill:goal{\offinterlineskip\grey:
+ \def\shade:h##1{%
+ \def\shade:v####1{\char####1##1\relax}%
+ \hbox to \wd\shade:box{\hss\shade:row\hss}}
+ \vss \shade:column \vss
+ }\ht0=\ht\shade:box \dp0=\dp\shade:box
+ \rlap{\box0}\box\shade:box
+ }
+\def\Fill: {\setbox0=\hbox{\grey:\char\fill:level\relax}\fill:size=\ht0
+ \fill:}
+\def\fill: #1#2{%
+ \ifdim \fill:size>\fill:goal
+ \advance\fill:level by-1
+ \ifnum \fill:level>-1 \let \fill:next = \Fill:
+ \else \let \fill:next = \fill:stop \fi
+ \else \edef#1{#1#2\the\fill:level}\advance\fill:goal by -\fill:size
+ \let \fill:next = \fill:
+ \fi \fill:next #1#2}
+\def\fill:stop#1#2{}
+
+\endinput