# [Tugindia] new environment

David Kastrup dak at gnu.org
Mon Apr 12 14:07:18 CEST 2004

"Badri T Natarajan" <tbadri at mail.tapmi.org> writes:

> Though the exhibits appear without error, the code is causing an
> error with the numbering of the exhibits and tables (floats?). I
> have \label{exhibit1} inside the exhibit environment. In the text I
> say "See Exhibit \ref {exhibit1}". In the output I get "See Exhibit
> 1". However subsequent references are all numbered incorrectly.

As you don't include a minimal example exhibiting your problem, one
can only guess.

You are probably doing the common error of placing the \label command
before the \caption.  Since an exhibit may contain more than one
caption, it is the captions that get numbered, not the exhibits.  For
that reason the label just refers to the current section (which at
the time of the label is the outermost referable entity).

Place the label after the caption.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>