Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(5.0.2195.6713); Sat, 15 May 2004 16:24:26 +0200 Received: by mail.proteosys.com (8.12.10/8.12.2) with ESMTP id i4FEOMlo002202 for ; Sat, 15 May 2004 16:24:23 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.119.176]) by relay2.uni-heidelberg.de (8.12.10/8.12.10) with ESMTP id i4FEKLD6022448; Sat, 15 May 2004 16:20:22 +0200 (MET DST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C43A88.5341C900" Received: from listserv (listserv.uni-heidelberg.de [129.206.119.176]) by listserv.uni-heidelberg.de (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id i4E1Rh83005625; Sat, 15 May 2004 16:18:37 +0200 Received: from LISTSERV.UNI-HEIDELBERG.DE by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8e) with spool id 208090 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 15 May 2004 16:18:36 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id i4FE8ZUZ028000 for ; Sat, 15 May 2004 16:08:35 +0200 Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) by relay2.uni-heidelberg.de (8.12.10/8.12.10) with ESMTP id i4FE9jD6020672 for ; Sat, 15 May 2004 16:09:46 +0200 (MET DST) Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1BOzrD-0001gS-7W for LATEX-L@listserv.uni-heidelberg.de; Sat, 15 May 2004 10:09:43 -0400 In-Reply-To: <16550.4621.526207.509473@istrati.mittelbach-online.de> Lines: 46 References: <16549.4057.399610.750080@istrati.mittelbach-online.de> <16550.4621.526207.509473@istrati.mittelbach-online.de> Return-Path: X-OriginalArrivalTime: 15 May 2004 14:24:26.0414 (UTC) FILETIME=[5380F4E0:01C43A88] User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Scanned-By: MIMEDefang 2.28 (www . roaringpenguin . com / mimedefang) X-ProteoSys-SPAM-Score: 0 () Content-class: urn:content-classes:message Subject: Re: Why don't we do just the following: Date: Sat, 15 May 2004 15:09:42 +0100 Message-ID: A X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Why don't we do just the following: Thread-Index: AcQ6iFOfvn3iTJxPQRuPQm4j8Zenew== From: "David Kastrup" Sender: "Mailing list for the LaTeX3 project" To: Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 4785 This is a multi-part message in MIME format. ------_=_NextPart_001_01C43A88.5341C900 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Frank Mittelbach writes: > \documentclass{article} > > \makeatletter > \def\@float#1{% > \def\@currentlabel{\@latexerr{ref to misplaced label}{explain}}% > \@ifnextchar[% > {\@xfloat{#1}}% > {\edef\reserved@a{\noexpand\@xfloat{#1}[\csname = fps@#1\endcsname]}% > \reserved@a}} > > \makeatother > > \begin{document} > > \begin{figure} \label{foo} \end{figure} > > Hallo \ref{foo} > > \end{document} > > > Or does _anybody_ know of _any_ intentional use > > of a \label _inside_ of a figure, _not_ referring to the figure but > > to its section? > > no and any env or command that would allow for labels would change > \@currentlabel anyway 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). And it has the advantage that if you are only out for a \pageref in the first place, this will still be legal. > > I mean, this must be the candidate for the most frequently asked > > question on LaTeX, ever. > > well it keeps people busy > > any suggestion for a good text? \label{whatever} without preceding or enclosing \caption. Labels must follow the item they are referencing. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum ------_=_NextPart_001_01C43A88.5341C900 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: Why don't we do just the following:

Frank Mittelbach = <frank.mittelbach@LATEX-PROJECT.ORG> writes:

> \documentclass{article}
>
> \makeatletter
> \def\@float#1{%
>   \def\@currentlabel{\@latexerr{ref to = misplaced label}{explain}}%
>   \@ifnextchar[%
>     {\@xfloat{#1}}%
>     = {\edef\reserved@a{\noexpand\@xfloat{#1}[\csname = fps@#1\endcsname]}%
>      = \reserved@a}}
>
> \makeatother
>
> \begin{document}
>
> \begin{figure} \label{foo} \end{figure}
>
> Hallo \ref{foo}
>
> \end{document}
>
>  > Or does _anybody_ know of _any_ = intentional use
>  > of a \label _inside_ of a figure, = _not_ referring to the figure but
>  > to its section?
>
> no and any env or command that would allow for = labels would change
> \@currentlabel anyway

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).  And it has the advantage that if = you are only out for a
\pageref in the first place, this will still be = legal.

>  > I mean, this must be the candidate for = the most frequently asked
>  > question on LaTeX, ever.
>
> well it keeps people busy
>
> any suggestion for a good text?

\label{whatever} without preceding or enclosing = \caption.
Labels must follow the item they are = referencing.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum

------_=_NextPart_001_01C43A88.5341C900--