home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / text / tex / 10569 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.8 KB  |  60 lines

  1. Newsgroups: comp.text.tex
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!news.duc.auburn.edu!ducvax.auburn.edu!hank
  3. From: hank@ducvax.auburn.edu
  4. Subject: Re: Anybody know how to put a framebox around a figure AND its caption?
  5. Message-ID: <1992Aug26.183800.1@ducvax.auburn.edu>
  6. Lines: 46
  7. Sender: usenet@news.duc.auburn.edu (News Account)
  8. Nntp-Posting-Host: ducvax
  9. Organization: Auburn University, AL
  10. References: <2A9BD167.29584@orion.oac.uci.edu>
  11. Date: Wed, 26 Aug 1992 23:38:00 GMT
  12. Lines: 46
  13.  
  14. In article <2A9BD167.29584@orion.oac.uci.edu>, refling@sloth.eng.uci.edu (John P. Refling) writes:
  15. > What I want is this:
  16. > +---------+
  17. > | FIGURE  |
  18. > | CAPTION |
  19. > +---------+
  20. >[text deleted] 
  21. > Anybody know how to put the framebox around a figure AND its caption?
  22.  
  23. Donald Arseneau recently answered this question. His solution follows. First,
  24. get DM Jones tex-index from niord.shsu.edu (in [fileserv.tex-faq] (?) ). This
  25. is an excellent source of TeX information (thanks DMJ). 
  26.  
  27. Arseneau's example puts the caption outside the box, but it does allow
  28. the caption to be in the box (just move the \caption line). I have not tested
  29. extensively, however. You should check tex-index for the most recent version.
  30.  
  31. --darrel hankerson hank@ducvax.auburn.edu
  32.  
  33. D Arseneau's macros follow:
  34.  
  35. % ----  put in a style file,  perhaps "fpbox.sty"  ----
  36. % Create a framed parbox using \begin{fpboxb} ... \end{fpbox}
  37. %
  38. \def\fpbox{\par
  39.   \setbox\@tempboxa\vbox\bgroup
  40.     \advance\hsize-2\fboxrule \advance\hsize-2\fboxsep \textwidth\hsize
  41. }
  42.  
  43. \def\endfpbox{\egroup\fbox{\box\@tempboxa}\par}
  44. %--------------------end fpbox.sty---------------------
  45. $ example:
  46. \begin{figure}
  47. \begin{fpbox}
  48. \footnotesize\begin{verbatim}
  49. stuff
  50. more stuff
  51. still more stuff
  52. lots and lots of stuff
  53. that's all the stuff
  54. \end{verbatim}
  55. \end{fpbox}
  56. \caption{The caption wants to be outside the box}
  57. \end{figure}
  58.  
  59.