Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!princeton!zandtwerk!tvz From: tvz@zandtwerk.Princeton.EDU (Timothy Van Zandt) Newsgroups: comp.text.tex Subject: Re: Tables/Figures staying put WITH label Message-ID: <7496@idunno.Princeton.EDU> Date: 25 Mar 91 12:44:24 GMT References: <1028@keele.keele.ac.uk> Sender: news@idunno.Princeton.EDU Organization: Princeton University, Princeton NJ Lines: 29 In article <1028@keele.keele.ac.uk> phd11@seq1.kl.ac.uk (A. Mcdonald) writes: > >In article <9162@castle.ed.ac.uk> robin@castle.ed.ac.uk (R C Smith) writes: >>In LaTeX how do you stop figures floating around apart from >>\begin{figure}[h] >> >... and the response from Timothy Van Zandt was .... > >>The whole point of the figure and table envirnments is to float their >>contents. Just leave out the \begin{figure}, \end{figure} and \caption{}. > >... Now the thing is this works beautifully, BUT I don't seem to be able >to get any kind of referencing using \label. > Put the following in a style file (unfortunately, it can't go in the preamble because of the @): \def\figureh{\vskip \intextsep \def\@captype{figure}} \def\endfigureh{\vskip \intextsep} Now the figureh environment (with no optional arguments) is like \begin{figure}[RIGHT HERE, OK!?!], in particular, the caption and label work as desired, and the figure gets listed in the list of figures. You could define tableh similarly, or do the same for any float. You can use both the figureh and the figure environments in the same document. Tim Van Zandt tvz@princeton.edu