njm@thor.inesc.pt (Nuno Joao Mamede) (06/20/91)
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 +-------------------------+