🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #10369

Tables and Figures surrounded by horizontal lines

#10369
From: Nuno Joao Mamede
Date: Wed, 19 Jun 1991 18:17
60 lines
2721 bytes
Hi,

I wold like to get {\it all} the figures and tables surrounded by
horizontal lines:

            ---------------------------------------------
                         (the figure or table)
            ---------------------------------------------
                      Figure *:  the caption          

However, the best solution I have found is not good enough,
since I am not a TeX expert. Here is the code I wrote:

% ---- introduces the first horizontal line (tables and figures)
%
\def\table{\@float{table}
 \nobreak \vskip 5pt \noindent \hrulefill \nobreak \vskip 5pt \nobreak}
\def\figure{\@float{figure}
 \nobreak \vskip 5pt \noindent \hrulefill \nobreak \vskip 5pt \nobreak}


% ---- introduces the second horizontal line
%
\long\def\@makecaption#1#2{
 \nobreak \vskip 10pt \noindent \hrulefill \nobreak \vskip 2pt 
 \setbox\@tempboxa\hbox{\footnotesize \bf {#1: #2}}
 \ifdim \wd\@tempboxa >\hsize \unhbox\@tempboxa\par \else \hbox
to\hsize{\hfil\box\@tempboxa\hfil} 
 \fi \vskip 20pt}

The above code has (at least) the problem of printing the optional
argument of \figure (or \table):

            ---------------------------------------------
            [htb]
                         (the figure or table)
            ---------------------------------------------
                      Figure *:  the caption          

So, a good and clean solution to my problem is welcome. 
Thanks in advance,
Nuno


        +-------------------------+-------------------------+
        |   Nuno J. Mamede        |        njm@inesc.pt     |
        |                         |                         |
        |   INESC                 +-------------------------+
        |   R. Alves Redol 9      |  Tel:   (351 1) 545150  |
        |   1000 Lisboa           |  Telex: (351 1) 15696   |
        |   Portugal              |  FAX:   (351 1) 525843  |
        +-------------------------+-------------------------+



-- 
        +-------------------------+-------------------------+
        |   Nuno J. Mamede        |        njm@inesc.pt     |
        |                         |                         |
        |   INESC                 +-------------------------+
Technical Details
Message-ID: <1810@inesc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uunet!mcsun!inesc!thor!njm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uunet!mcsun!inesc!thor!njm
From: njm@thor.inesc.pt (Nuno Joao Mamede)
Newsgroups: comp.text.tex
Subject: Tables and Figures surrounded by horizontal lines
Message-ID: <1810@inesc.UUCP>
Date: 19 Jun 91 18:17:56 GMT
Sender: news@inesc.UUCP
Organization: INESC - Portugal
Lines: 60
Nntp-Posting-Host: thor.inesc.pt