LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
David Kastrup <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Mon, 17 May 2004 08:50:17 +0200
text/plain (81 lines)
Donald Arseneau <[log in to unmask]> writes:

> Frank Mittelbach <[log in to unmask]> writes:
> >  > It was supposed to hit at \label time.  But since putting a label
> >
> > i still don't see how that would work
> You did analyze it already: it is a confusing undefined control
> sequence  error, where the "real" error message is the csname.  The
> \csname must be constructed in a way that does not equate it to \relax.
> Url.sty contains:
> \def\Url@movingtest{\begingroup
>  \ifx\let\HyPsd@LetCommand % we are already in a pdf string!
>   \expandafter\Url@unmove \fi % give the argument and hope for the best
>  \let\Url@moving\relax\relax\relax
>  \ifx\Url@moving\relax\else \expandafter\Url@unmove \fi
>  \endgroup}
> \long\def\Url@unmove#1\Url@y{\endgroup \ifx\protect\relax\else\protect\Url\fi}
> \edef\Url@moving{\csname Url Error\endcsname}
> \expandafter\edef\Url@moving
>  {\csname url used in a moving argument.\endcsname}
> \expandafter\expandafter\expandafter \let \Url@moving\@undefined
> Note the last line!  This gives error messages like:
> ! Undefined control sequence.
> \Url Error ->\url used in a moving argument.
> l.104 \section{\url{moving}}
> Anyway, We should still allow \label for purposes of \pageref, so the
> error should indeed be encoded to occur at \ref.  It would be nice if
> \label would put the current \inputlineno into the error message, but
> that requires altering the definition of \label.

No, it doesn't.  I seem to be talking against the wall here.  Here
are the relevant definitions:


\long\def \protected@write#1#2#3{%

As you can see, putting \the\inputlineno into \currentlabel will
expand to the input line number at the time where \label is called.

I have to admit to Frank that without changing the definition of
\label, we won't get the label name itself for reference in the
message.  Unless we wanted to play _very_ dirty tricks and
use something like

And the \pickapart breaks up \reserved@a into its constituents.

However, if we are going to change \@float, there is little harm in
changing \label to include a
into the definition of \label.

I can't see \label working in a context where the above would have

David Kastrup, Kriemhildstr. 15, 44793 Bochum