[tex-eplain] Warnings about redefinition of xref labels

Karl Berry karl at freefriends.org
Tue Feb 28 22:59:36 CET 2006


    If it is indeed workable, I guess it would outdate this note
    in xeplain.tex:

Say you have a document with 100 labels.  You run it a few times so
everything is defined.  Then you add a new page to the beginning of the
document, so all the page number shift by one.  Won't you get 100
warnings?  That's what my comment was trying to say.

Maybe it's worth the warnings to get the diagnostics in the more usual
case.  So, a couple notes, maybe you already considered them:

      \edef\oldvalue{\csname\xrlabel{#1}\endcsname}%
      \edef\newvalue{#2}%
      \ifx\oldvalue\newvalue

I think it would be better to use more private names for the temporary
control sequences.

        \message{\linenumber Label '#1' '\csname#3word\endcsname'
                 '#2' already defined with a value
                 \csname\xrlabel{#1}\endcsname}%

It is traditional to use `...' in TeX messages like this (despite ISO).

Also, having quotes around the value seems desirable.

Also, perhaps the message could just use `\oldvalue' instead of
repeating its definition.

Also, the grammar seems a little odd.  I've forgotten -- what kind of
words are #2 and #3?  I'd speculate something like this might read better:

        \message{\linenumber `\csname#3word\endcsname' label `#1's
                 new value `#2' overwriting previous value `\oldvalue'.}

Thanks,
k



More information about the tex-eplain mailing list