Article View: comp.text.tex
Article #1329Re: hangcaption.sty; works but not with \label
From: George D. Greenwade
Date: Tue, 11 Aug 1992 21:28
Date: Tue, 11 Aug 1992 21:28
50 lines
2962 bytes
2962 bytes
In <1992Aug11.143055.18885@ctr.columbia.edu> (comp.tex.tex, Tue, 11 Aug
1992 14:30:55 GMT) anselmo@cumesb.mech.columbia.edu (Andrew P. Anselmo)
posted:
> Thanks to all who sent me corrections for hangcaption.sty. This works
> nicely for basic captions, but if you put a \label for long captions, you
> get this form:
>
> Figure 27.
> Sample output for a long caption. As many can tell,
> I am a neophyte TeX person, and can't even pronounce
> it correctly.
>
>
> Any solutions?
This is related, believe me. In
<1992Aug11.194154.6366@alchemy.chem.utoronto.ca> (comp.text.tex, Tue, 11
Aug 1992 19:41:54 GMT) mroussel@alchemy.chem.utoronto.ca (Marc Roussel)
posted:
> In article <0095EBB9.4825C640.13366@SHSU.edu> "George D. Greenwade"
> <bed_gdg@SHSU.edu> writes:
> >With respect to b) [I haven't tried this, but it's a good guess], try:
> > \caption{\label{fig:tree} A tree grows in Brooklyn.\protect\cite{BugsBunny}}
> > ^^^^^^^^
> [...]
> >(i.e., it might be wise to include \protect\label as well
> >if you insist on including the \label in the \caption).
>
> The first bit of advice (\protect\cite{}) is sound, but
> \protect\label is not necessary because \label is specifically kludged
> to work correctly inside of \caption{}. I have no idea if unnecessary
> \protect declarations have any harmful effects.
Except that they create ``invisible space'' and the kludge is far less than
perfect. The apparently-superfluous \protect does matter for a few
interesting applications. As Andrew and I experimented on this, it became
apparent that moving the \label outside (but adjacent to) the \caption was
the fix, i.e., changing \caption{\label{something}This is the caption text}
to \caption{This is the caption text}\label{something} worked and fixed the
problem above.
Regards, George
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU
Department of Economics and Business Analysis THEnet: SHSU::BED_GDG
College of Business Administration Voice: (409) 294-1266
P. O. Box 2118 FAX: (409) 294-3612
Sam Houston State University Internet: bed_gdg@SHSU.edu
Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Technical Details
Message-ID:
<0095EF1B.959652E0.23240@SHSU.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!usc!noiro.acs.uci.edu!network.ucsd.edu!mvb.saic.com!info-texShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!usc!noiro.acs.uci.edu!network.ucsd.edu!mvb.saic.com!info-tex From: "George D. Greenwade" <bed_gdg@SHSU.edu> Newsgroups: comp.text.tex Subject: Re: hangcaption.sty; works but not with \label Message-ID: <0095EF1B.959652E0.23240@SHSU.edu> Date: Tue, 11 Aug 1992 16:28:48 CDT Organization: Info-Tex<==>Comp.Text.Tex Gateway X-Gateway-Source-Info: Mailing List Lines: 50