[tex-eplain] Warnings about redefinition of xref labels

Oleg Katsitadze olegkat at gmail.com
Sun Apr 9 10:44:34 CEST 2006


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

To avoid a hyperlink, give the option `nolinks' to
\enablehyperlinks:

  \input eplain
  \enablehyperlinks[nolinks]

  [...]

I am not sure if this was your (Dorai's) original intent,
but if you want to automate this selection mechanism
(hyperlinks under pdfTeX / plain text otherwise), this can
be done with the following:

  \input eplain
  \ifpdf
    \enablehyperlinks
  \else
    \enablehyperlinks[nolinks]
  \fi

  [...]

Without this, \enablehyperlinks currently falls back on the
dvipdfm driver when \ifpdf is false (in the next release,
the fall-back will be the new hypertex driver, already in
CVS).

Please note that with Eplain 3.0, another ("not
recommended") way to avoid hyperlinks is to just drop the
\enablehyperlinks command.  Please do not rely on this,
always use `\enablehyperlinks[nolinks]' in documents which
use hyperlink-related macros -- in the new version, all
hyperlink commands give an error message if they are called
without a prior \enablehyperlinks.

> 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