home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.text.tex
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!news.duc.auburn.edu!ducvax.auburn.edu!hank
- From: hank@ducvax.auburn.edu
- Subject: Re: Anybody know how to put a framebox around a figure AND its caption?
- Message-ID: <1992Aug26.183800.1@ducvax.auburn.edu>
- Lines: 46
- Sender: usenet@news.duc.auburn.edu (News Account)
- Nntp-Posting-Host: ducvax
- Organization: Auburn University, AL
- References: <2A9BD167.29584@orion.oac.uci.edu>
- Date: Wed, 26 Aug 1992 23:38:00 GMT
- Lines: 46
-
- In article <2A9BD167.29584@orion.oac.uci.edu>, refling@sloth.eng.uci.edu (John P. Refling) writes:
- > What I want is this:
- >
- > +---------+
- > | FIGURE |
- > | CAPTION |
- > +---------+
- >[text deleted]
- > Anybody know how to put the framebox around a figure AND its caption?
-
- Donald Arseneau recently answered this question. His solution follows. First,
- get DM Jones tex-index from niord.shsu.edu (in [fileserv.tex-faq] (?) ). This
- is an excellent source of TeX information (thanks DMJ).
-
- Arseneau's example puts the caption outside the box, but it does allow
- the caption to be in the box (just move the \caption line). I have not tested
- extensively, however. You should check tex-index for the most recent version.
-
- --darrel hankerson hank@ducvax.auburn.edu
-
- D Arseneau's macros follow:
-
- % ---- put in a style file, perhaps "fpbox.sty" ----
- % Create a framed parbox using \begin{fpboxb} ... \end{fpbox}
- %
- \def\fpbox{\par
- \setbox\@tempboxa\vbox\bgroup
- \advance\hsize-2\fboxrule \advance\hsize-2\fboxsep \textwidth\hsize
- }
-
- \def\endfpbox{\egroup\fbox{\box\@tempboxa}\par}
- %--------------------end fpbox.sty---------------------
- $ example:
- \begin{figure}
- \begin{fpbox}
- \footnotesize\begin{verbatim}
- stuff
- more stuff
- still more stuff
- lots and lots of stuff
- that's all the stuff
- \end{verbatim}
- \end{fpbox}
- \caption{The caption wants to be outside the box}
- \end{figure}
-
-