summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/frame/frame.tex
blob: de9f915913f0ae014b23ee01e5c501416bdbd35c (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%%
%% $Id: frame.tex 320 2010-05-15 09:42:13Z herbert $
%%
%% COPYRIGHT 1992/2010, by Timothy Van Zandt, tvz@Princeton.EDU
%% COPYRIGHT 2010, by Herbert Voss, hvoss@tug.org
%%
%% Copyright:
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   frame.tex/frame.sty provides fancy frames for generic TeX 
%
% Usage:
% \fancyframebox {rule thickness} {separation from inner guy} {inner guy}
%
% \makeemptybox {width} {height} {depth}
%%
%
\def\fileversion{1.0}
\def\filedate{2010/05/15}
%
\csname FrameLoaded\endcsname
\let\FrameLoaded\endinput
%
\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11\relax
\message{\space\space v\fileversion\space\space \filedate\space\space <tvz>}
 
\newbox\fancyboxA
\newbox\fancyboxB
\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\fancyboxB=\hbox{#3}%
    \dimen\fancyboxD=#1\relax
    \advance\dimen\fancyboxD by #2\relax
    \advance\dimen\fancyboxD by \dp\fancyboxB
    \hbox{%
 \lower\dimen\fancyboxD\hbox{%
     \vbox{%
  \hrule height #1\relax
  \hbox{%
      \vrule width #1\relax
      \kern #2\relax
      \vbox{\vskip #2\relax\box\fancyboxB\vskip #2\relax}%
      \kern #2\relax
      \vrule width #1\relax}%
  \hrule height #1\relax}}}}
%
\expandafter\catcode`\@=\TheAtCode\relax
\endinput
%% END frame.tex/frame.sty