[tex-eplain] Warnings about redefinition of xref labels

Oleg Katsitadze olegkat at gmail.com
Tue Feb 28 21:06:55 CET 2006


Tomas Penicka (CC'd) provided me with code to issue warnings
about redefined cross-reference labels.  Here is the changed
definition of \@definelabel:

    %warn about multiple defined references. By Tomas Penicka, tom.penicka at centrum.cz
        \message{\linenumber Label '#1' '\csname#3word\endcsname'
                 '#2' already defined with a value
    %end of warning
    % Define the control sequence.
    % Remember what kind of label this is, so \ref will know what to do.
  %  \global\setproperty{\xrlabel{#1}}{class}{#3}%

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

% [...] I
% would like to check for labels being defined twice, but I don't know
% how to do that.  If the cross-reference file has been read in, many
% cross-references will be defined that I don't want to complain about.
% It is only if two \xrdef commands are given to the same string that I
% want to complain.  I could define a new control sequence for each
% cross-reference, and check that, but that seems like too high of a
% price to pay.

I can't see any such problems with the above code (maybe I
am overlooking something?).  If somebody can think of any
problems, please let us know.  Otherwise it'll go into the
next release :).


More information about the tex-eplain mailing list