Package: lacheck
Version: 1.26-11.1
Severity: wishlist

lacheck doesn't give any warnings if you use \label before \caption
in a figure environment, and neither does LaTeX.

Consider this example:
\documentclass{article}
\begin{document}
\section{Section}

\begin{figure}
\label{fig:l1}
\caption{First figure}
\end{figure}
\begin{figure}
\label{fig:l2}
\caption{Second figure}
\end{figure}
\begin{figure}
\caption{Working figure}
\label{fig:l3}
\end{figure}

This is the first figure:~\ref{fig:l1}, and this is the second 
one:~\ref{fig:l2}.
This is a good reference: \vref{fig:l3}.

\end{document}

This will print: first figure: 1, and this is the second one: 1. This is a good
reference: 3.

Obviously the document is written wrong, \label should be used after \caption,
otherwise it doesn't work.

It would be useful if lacheck, or LaTeX itself could warn about this situation.
It is annoying to see all your figure references refering to the same figure.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29.3 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lacheck depends on:
ii  libc6                         2.9-13     GNU C Library: Shared libraries

Versions of packages lacheck recommends:
ii  texlive-base               2007.dfsg.2-4 TeX Live: Essential programs and f

Versions of packages lacheck suggests:
pn  auctex                        <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to