summaryrefslogtreecommitdiff
path: root/dviware/umddvi/doc/box.tex
blob: f33c727dfb9b81e7a38236cb2f86684b779d7daf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Fancy frames
%
% Usage:
% \fancyframebox {rule thickness} {separation from inner guy} {inner guy}
% 
% \makeemptybox {width} {height} {depth}

\newbox\FancyboxA
\newdimen\FancyboxD

\def\makeemptybox#1#2#3{\setbox\FancyboxA=\hbox{}\wd\FancyboxA=#1\relax
    \ht\FancyboxA=#2\relax \dp\FancyboxA=#3\relax \box\FancyboxA }

\def\fancyframebox#1#2#3{%
    \leavevmode
    \setbox\FancyboxA=\hbox{#3}%
    \dimen\FancyboxD=#1\relax
    \advance\dimen\FancyboxD by #2\relax
    \advance\dimen\FancyboxD by \dp\FancyboxA
    \hbox{%
	\lower\dimen\FancyboxD\hbox{%
	    \vbox{%
		\hrule height #1\relax
		\hbox{%
		    \vrule width #1\relax
		    \kern #2\relax
		    \vbox{\vskip #2\relax\box\FancyboxA\vskip #2\relax}%
		    \kern #2\relax
		    \vrule width #1\relax}%
		\hrule height #1\relax}}}}