[tex-eplain] Warnings about redefinition of xref labels
Dorai Sitaram
dorai at ccs.neu.edu
Mon Apr 10 18:13:15 CEST 2006
Thanks, Oleg and Karl. And I trust you (Oleg) are feeling better.
I am not wedded to the name \href. So \hlhref would be OK -- a user can
always \let \href = \hlhref. Indeed, the use of the name \href may not be
advisable for semantic reasons as well, as hyperref.sty's \href seems to
generalize from explicit external URLs to document-internal LaTeX labels in
a way that may not be possible for eplain.
Specifically, \href{#somelabel}{link-text} (note the #) makes link-text a
hyperlink to wherever \label{somelabel} was placed in the current document.
I don't know what the several labels in eplain translate to in terms of
hyperlink anchor names in the PDF output (i.e., the PDF equivalent of <a
name="...">). For LaTeX and hyperref.sty, \label's argument apparently
translates exactly into the anchor name.
I take it that eplain massages the label name somewhat differently
depending on what category it is in, as it seems possible to have the same
user-supplied label for various label categories. LaTeX doesn't, and in a
way that makes the translation into HTML or PDF easier.
Dorai
>
> Sorry for such a late reply -- I was sick for a few days,
> but now I'm back on-line.
>
> On Thu, Apr 06, 2006 at 01:09:27PM -0500, Karl Berry wrote:
> > Argh. It seems despite our best efforts, Oleg and I made the #1 mistake
> > in documentation -- failing to answer the obvious question, while
> > dealing with all kinds of obscurities.
>
> I'm sure this is not the last of such questions, but with
> tips from the gentle user, I hope we'll improve :).
>
> > I.e., \href{URL}{link-text} should make link-test a link to URL, when
> > possible (viz., PDF), or just typeset link-test by itself in print.
> >
> > I believe the answer involves using \hlstart...\hlend
>
> Indeed. For example:
>
> \input eplain
> \enablehyperlinks
>
> \hlstart{url}{}{http://tug.org/eplain}Eplain homepage\hlend.
>
> \bye
>
> [...]
>
> > Clearly this cries out for a high-level macro, probably best named \href :).
>
> Certainly -- the \hlstart...\hlend construct is not as
> clean. Currently all hyperlink-related macros start with
> the `hl' prefix, so the name `\href' will break current
> naming convention, but we still might be better off using
> the same name as hyperref.sty does.
>
> > I tried \usepackage{hyperref} -- hyperref wasn't explicitly listed
> > as a package known not to work --
> >
> > It should be so listed.
>
> Sure, I'll add it.
>
> Thanks for the helpful questions and comments :),
> Oleg
More information about the tex-eplain
mailing list