Frank Mittelbach <[log in to unmask]> writes:

>  > Ok, your proposal has the disadvantage that the error occurs only when
>  > referring to the label (and at the point of reference instead of
>  > definition).
>
> so does yours i think, or how was your proposal meant?

It was supposed to hit at \label time.  But since putting a label
inside of a figure in order to get a \pageref would be legal...

>  > > any suggestion for a good text?
>  >
>  > \label{whatever} without preceding or enclosing \caption.
>  > Labels must follow the item they are referencing.
>
> well "whatever" is not known when we generate that text, is it?

Probably not.  But doesn't \label use something like \protected@edef
before \write?  If the label name at that time was stored in some
macro, it should be possible to have it written out as part of the
text.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum