<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% 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}}}}
</pre></body></html>