[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#221822: marked as done (\label has to be put after \caption in order to be effective)



Your message dated Thu, 20 Nov 2003 22:27:45 +1100
with message-id <20031120112745.GA2717@deprecation.cyrius.com>
and subject line Bug#221822: \label has to be put after \caption in order to be effective
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Nov 2003 10:02:23 +0000
>From tbm@cyrius.com Thu Nov 20 04:02:22 2003
Return-path: <tbm@cyrius.com>
Received: from bangpath.uucico.de [195.71.9.197] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AMldl-00069M-00; Thu, 20 Nov 2003 04:02:21 -0600
Received: by bangpath.uucico.de (Postfix, from userid 10)
	id 556AA26B2C; Thu, 20 Nov 2003 11:02:20 +0100 (CET)
Received: by deprecation.cyrius.com (Postfix, from userid 1000)
	id 7CB27FEB6; Thu, 20 Nov 2003 21:01:13 +1100 (EST)
Date: Thu, 20 Nov 2003 21:01:13 +1100
From: Martin Michlmayr <tbm@cyrius.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: \label has to be put after \caption in order to be effective
Message-ID: <[🔎] 20031120100113.GA1774@deprecation.cyrius.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF"
Content-Disposition: inline
X-Reportbug-Version: 2.35
User-Agent: Mutt/1.5.4i
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-8.9 required=4.0
	tests=BAYES_30,HAS_PACKAGE,PATCH_UNIFIED_DIFF
	autolearn=ham version=2.53-bugs.debian.org_2003_11_15
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_11_15 (1.174.2.15-2003-03-30-exp)


--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: tetex-bin
Version: 2.0.2-5
Severity: normal

I have a table environment which I want to give a caption as well as a
label so I can refer to it.  When I made a reference, I noticed that
it was wrong -- instead of giving the number of the table the number
of the section was given.  I tracked this down now and found out that
you have to put the \caption _before_ the \label, otherwise the \label
isn't effective.  I think this behaviour is wrong considering that my
\label is clearly within \begin{table} and \end{table} and so it's
obvious what the \label refers to.

To show this problem I have attached files test1.tex and test2.tex.
test1.tex refers to 2.1, which is wrong (it's the section), while
test2.tex refers to 1, which is correct.

This behaviour is very unintuitive and I hope this can be fixed
upstream.



-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux deprecation 2.4.22-1-686 #6 Sat Oct 4 14:09:08 EST 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages tetex-bin depends on:
ii  debconf                    1.3.20        Debian configuration management sy
ii  debianutils                2.6.1         Miscellaneous utilities specific t
ii  dpkg                       1.10.15       Package maintenance system for Deb
ii  ed                         0.2-20        The classic unix line editor
ii  libc6                      2.3.2.ds1-10  GNU C Library: Shared libraries an
ii  libgcc1                    1:3.3.2-1     GCC support library
ii  libkpathsea3               2.0.2-4.3     shared libkpathsea for teTeX
ii  libpng12-0                 1.2.5.0-4     PNG library - runtime
ii  libstdc++5                 1:3.3.2-1     The GNU Standard C++ Library v3
ii  libwww0                    5.4.0-9       The W3C WWW library
ii  libxaw7                    4.3.0-0pre1v1 X Athena widget set library
ii  mime-support               3.23-1        MIME files 'mime.types' & 'mailcap
ii  perl                       5.8.1-4       Larry Wall's Practical Extraction 
ii  t1lib1                     1.3.1-3       Type 1 font rasterizer library - r
ii  tetex-base                 2.0.2-5       Basic library files of teTeX
ii  xlibs                      4.3.0-0pre1v1 X Window System client libraries
ii  zlib1g                     1:1.1.4-16    compression library - runtime

-- debconf information excluded

-- 
Martin Michlmayr
tbm@cyrius.com

--h31gzZEtNLTqOjlF
Content-Type: application/x-tex
Content-Disposition: attachment; filename="test1.tex"
Content-Transfer-Encoding: quoted-printable

\documentclass[12pt]{article}=0A=0A\begin{document}=0A=0A\section{1}=0A=0A=
=0A\section{2}=0A=0A\subsection{2.1}=0A=0A\begin{table}[here]=0A\begin{cent=
er}=0A\begin{tabular}{c}=0Ada \\=0A\end{tabular}=0A\end{center}=0A=0A\label=
{foo}=0A\caption{foo}=0A\end{table}=0A=0AThis is a reference for table~\ref=
{foo}.=0A=0A\end{document}=0A=0A
--h31gzZEtNLTqOjlF
Content-Type: application/x-tex
Content-Disposition: attachment; filename="test2.tex"
Content-Transfer-Encoding: quoted-printable

\documentclass[12pt]{article}=0A=0A\begin{document}=0A=0A\section{1}=0A=0A=
=0A\section{2}=0A=0A\subsection{2.1}=0A=0A\begin{table}[here]=0A\begin{cent=
er}=0A\begin{tabular}{c}=0Ada \\=0A\end{tabular}=0A\end{center}=0A=0A\capti=
on{foo}=0A\label{foo}=0A\end{table}=0A=0AThis is a reference for table~\ref=
{foo}.=0A=0A\end{document}=0A=0A
--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

--- test1.tex	2003-11-20 20:54:58.000000000 +1100
+++ test2.tex	2003-11-20 20:55:08.000000000 +1100
@@ -16,8 +16,8 @@
 \end{tabular}
 \end{center}
 
-\label{foo}
 \caption{foo}
+\label{foo}
 \end{table}
 
 This is a reference for table~\ref{foo}.

--h31gzZEtNLTqOjlF--

---------------------------------------
Received: (at 221822-done) by bugs.debian.org; 20 Nov 2003 11:28:57 +0000
>From tbm@cyrius.com Thu Nov 20 05:28:57 2003
Return-path: <tbm@cyrius.com>
Received: from bangpath.uucico.de [195.71.9.197] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AMmzY-0000DR-00; Thu, 20 Nov 2003 05:28:56 -0600
Received: by bangpath.uucico.de (Postfix, from userid 10)
	id 2A82126BAC; Thu, 20 Nov 2003 12:28:56 +0100 (CET)
Received: by deprecation.cyrius.com (Postfix, from userid 1000)
	id 57BD7FEB6; Thu, 20 Nov 2003 22:27:45 +1100 (EST)
Date: Thu, 20 Nov 2003 22:27:45 +1100
From: Martin Michlmayr <tbm@cyrius.com>
To: Frank =?iso-8859-1?Q?K=FCster?= <frank@kuesterei.ch>
Cc: 221822-done@bugs.debian.org
Subject: Re: Bug#221822: \label has to be put after \caption in order to be effective
Message-ID: <20031120112745.GA2717@deprecation.cyrius.com>
References: <[🔎] 20031120100113.GA1774@deprecation.cyrius.com> <[🔎] 87k75vl1xi.fsf@alhambra.bioz.unibas.ch>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <[🔎] 87k75vl1xi.fsf@alhambra.bioz.unibas.ch>
User-Agent: Mutt/1.5.4i
Delivered-To: 221822-done@bugs.debian.org
X-Spam-Status: No, hits=-4.2 required=4.0
	tests=BAYES_20,QUOTED_EMAIL_TEXT
	version=2.53-bugs.debian.org_2003_11_20
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_11_20 (1.174.2.15-2003-03-30-exp)

* Frank Küster <frank@kuesterei.ch> [2003-11-20 12:22]:
> number. If one would do the stuff that is needed to "attach" a \label to
> a figure or table environment, this would mean to give it a number. But
> then, after
[...]
> the second caption would be "Table 3: ..." and everybody would wonder
> where ist Table 2?
> 
> If you can accept that, it would be nice if you close this bug. Simply
> send mail to 221822-done@bugs.debian.org.

Hmm, okay, your explanation makes sense.  Thanks for taking the time to
answer.

-- 
Martin Michlmayr
tbm@cyrius.com



Reply to: