[texhax] A new question not in the TeX FAQ

Steve Schwartz s.schwartz at imperial.ac.uk
Sat Nov 1 16:55:50 CET 2008


Re \usebox in \label:

On Sat, 2008-11-01 at 12:32 -0200, Eduardo M KALINOWSKI wrote:
> I'm sure someone can come up with a more technical (or texnical)
> explanation, but that is the idea.

I missed (or more correctly deleted) the beginning of this discussion,
but I would point to two things. Firstly, here's the entry for \label
resulting from typing info latex into my linux console and navigating to
the \label command:

==============
`\label{key}'

   A `\label' command appearing in ordinary text assigns to the `key'
the number of the current sectional unit; one appearing inside a
numbered environment assigns that number to the `key'.

   A `key' can consist of any sequence of letters, digits, or
punctuation characters.  Upper and lowercase letters are different.

...
===============

Secondly, and more importantly, \label doesn't typeset anything, it sets
up the key for referencing, e.g.,

\ref{key}  will produce the section number (or enumeration)
corresponding to the location of the \label{key} command, and
\pageref{key} will produce the number of the page where the \label
command appears. Latex does this by looking up "key" in the aux file and
finding the corresponding numbers. The aux file is pure text. There's no
way to put a box there, and even if there were, how would it be able to
look up the contents of a box, which could contain graphics, picture
environments, minipages, or anything else?

Steve

-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz at imperial.ac.uk
Imperial College London          Office: Huxley 6M70 
London SW7 2AZ, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+



More information about the texhax mailing list