home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!rutgers!cmcl2!adm!smoke!brl.mil!fsbrn
- From: fsbrn@brl.mil (Fred S. Brundick)
- Newsgroups: comp.text.tex
- Subject: Re: help with caption ?
- Message-ID: <19342@smoke.brl.mil>
- Date: 6 Nov 92 20:11:22 GMT
- References: <1992Nov5.210204.1@utxvms.cc.utexas.edu>
- Sender: news@smoke.brl.mil
- Reply-To: fsbrn@brl.mil
- Organization: Army Research Laboratory
- Lines: 27
-
- In article <1992Nov5.210204.1@utxvms.cc.utexas.edu>, mtaw621@utxvms.cc.utexas.edu writes:
- |> I do not know how to do the following, within a \caption.
- |> (i) How to have more than one line of text, appropriately aligned
- |> to the right the word "Figure 1".
-
- Here is what I use. If a caption does not fit on one line, it calculates
- the width of "Figure n.---" and uses it as the hanging indent.
-
- \long\def\@makecaption#1#2{
- \vskip 10pt
- \setbox\@tempboxa\hbox{#1.---{\em #2}}
- \ifdim \wd\@tempboxa > \hsize% IF longer than one line
- \setbox\@tempboxa\hbox{#1.---}% THEN set as ordinary paragraph
- \@tempdima=\hsize% with hanging indent
- \advance\@tempdima by -\wd\@tempboxa
- #1.---\parbox[t]{\@tempdima}%
- {\if@raggedright\rightskip\@flushglue\fi\em #2}\par
- \else% ELSE center.
- \hbox to\hsize{\hfil\box\@tempboxa\hfil}
- \fi}
-
- If you change the style in line 3 make sure to do the same thing in line 5.
-
- dsw, fferd
- Fred S. Brundick
- USARL, APG, MD.
- <fsbrn@brl.mil>
-