\ProvidesPackage{nbox}[1996/03/10  Boxes, useful for pictures.]

% Use these in future rather than \nBox,... since usually the units
% should be \unitlength.

\providecommand{\NBox}[2][40]{\parbox[c][3\baselineskip][c]{#1\unitlength}%
        {\centering#2}}
\providecommand{\LBox}[2][20]{\parbox[c][3\baselineskip][c]{#1\unitlength}%
        {\raggedright#2}}
\providecommand{\RBox}[2][25]{\parbox[c][3\baselineskip][c]{#1\unitlength}%
        {\raggedleft#2}}

% Kept for backward compatibility, and also when units such as \linewidth
% are used instead of \unitlength.

\providecommand{\nBox}[2][40\unitlength]{\parbox[c][3\baselineskip][c]{#1}%
        {\centering#2}}
\providecommand{\lBox}[2][20\unitlength]{\parbox[c][3\baselineskip][c]{#1}%
        {\raggedright#2}}
\providecommand{\rBox}[2][25\unitlength]{\parbox[c][3\baselineskip][c]{#1}%
        {\raggedleft#2}}


% \tBox is like \nBox, except that the text is aligned at the top.
\providecommand{\tBox}[2][40\unitlength]{\parbox[t][3\baselineskip]{#1}%
        {\centering#2}}
\providecommand{\TBox}[2][40]{\parbox[t][3\baselineskip]{#1\unitlength}%
        {\centering#2}}

%{ for brace checking, avoid problem with the \left...
\providecommand{\rBrace}[3][25]%
{{$\left\}\mbox{\rule{0pt}{#2\unitlength}}\right.$
\lBox[#1\unitlength]{#3}}}


\providecommand{\lBrace}[3][25]%
{{\rBox[#1\unitlength]{#3}
$\left.\mbox{\rule{0pt}{#2\unitlength}}\right\{$}}
%} for brace checking, avoid problem with the \right...

\endinput

% \rBrace places a right brace to the right of a given position, with some
% text to the right of the brace, while like this:
%
%    \lBrace{13}{some text}    \rBrace{13}{some text}
%
%  some text {|    |               |    |} some text
%             |    |               |    |
%             |____|               |____|
%
% In the above examples, 13 was the `height' of the brace.
% Well, actually, it is not really the height---you'll need some trial
% and error.

% Now use \rBrace like this:
% place the following in a text box in picture:
% \rBrace[30]{13}{Return address}
% where the optional first argument is the maximum width of the text to the
% left of the brace and 13 is the `height' of the brace.


% As originally written, but the above definition may work better
% (get the spacing between the box and the brace better).

%{ for brace checking, avoid problem with the \right...
\providecommand{\rBrace}[3][25]%
{{$\left.\mbox{\rule{0pt}{#2\unitlength}}\right\}$
\lBox[#1\unitlength]{#3}}}





