[tex-eplain] Warnings about redefinition of xref labels

Oleg Katsitadze olegkat at gmail.com
Mon Apr 10 22:33:01 CEST 2006


On Mon, Apr 10, 2006 at 02:51:43PM -0400, Dorai Sitaram wrote:
> \href{#somelabel}{...} should point to wherever
> \definexref{somelabel}{somevalue}{whatever} is in the current document.

I see now.

> LaTeX \label does something extra that isn't really very eplainesque.  It
> depends on there being numbered sections, which eplain considers user
> territory.

Certainly.

> 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').

>   \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.  But this
should work:

  \hlstart{}{}{pageone} page one\hlend

Instead of creating a URL link, this creates a named
internal link (type `name', the default).  Note that you
don't need the #.

With \hlstart, you can't really differentiate between
internal and external links by the leading # in the third
parameter, like with hyperref's \href.  The differentiation
is at the level of link types (the first parameter).  All
`url' links are external URLs (meaning the Internet, not the
local file system or the current document); all `name' links
are internal; and there is a `filename' link which can be
used to refer to an anchor in another local PDF file.

> \hlstart's third argument (the URL) should be read within a group that does
> \uncatcodespecials.

You are right, my bad.  The third parameter is normally used
to pass labels for internal links, so I figured the user
just would not use weird chars in the labels.  But since the
third parameter is also used to read URLs for `url' links,
it should definitely accept things like # and ~.  I'll fix
this.

Thanks again,
Oleg


More information about the tex-eplain mailing list