[tex-eplain] Warnings about redefinition of xref labels

Dorai Sitaram dorai at ccs.neu.edu
Mon Apr 10 23:47:40 CEST 2006


Oleg wrote
> Dorai wrote:
> 
> > By the way, here's a quick-and-dirty def of \href in terms of \hlstart
> 
> Thanks!  I'll use this, and add the stuff to detect the
> local refs (`#label').

You're welcome.  But I do think you get the `#label' for free, with no
special pleading.  I haven't seen it fail yet.  See below.

> >   \definexref{pageone}{1};
> 
> >   \hlstart{url}{}{#pageone} page one\hlend
> 
> [...]
> 
> > I manually changed #'s catcode to 11 just
> > before the \hlstart, and the hyperlink was then made correctly.
> 
> But this shouldn't work:  `page one' will be made into a URL
> link, so when you click on it, a browser should pop up and
> try to open the URL `#pageone', failing at that.  

I thought, after your explanation, that maybe the link was going to the
first page because page 1 is some kind of default, not because I'd put the
\definexref there.  So I placed the \definexref on a different page.  Try
the following:

%----------->8--------------

% f.tex

\input eplain
\enablehyperlinks

We are on page 1.

\vfill\eject

We are on page 2.  Let's tag it.
\definexref{apagetag}{2};

\vfill\eject

We are on page 3.  Let's go to \hlstart{url}{}{#apagetag} the tagged
page\hlend.

\bye

%----------->8--------------


I ran 

  $ pdfetex f
  $ acroread f.pdf

on a Solaris box, and sure enough, clicking "the tagged page" link on page
3 takes me to page 2.  

I also tried viewing f.pdf on Firefox on Windows, and the link works there
too.  I'll try it on Mac OS X later.  I urge others to check the situation
in various ways they can think of.

Whatever the reason, it works as expected (by me at least)!  Please don't
disable it now! :-)


Dorai



More information about the tex-eplain mailing list