[tex-eplain] Improvement for hyperlink option handling

geolsoft at mail.ru geolsoft at mail.ru
Sun Sep 4 11:31:07 CEST 2005

On Sun, Sep 04, 2005 at 12:21:18AM +0200, Karl Berry wrote:
> Can we map things so that the same names can
> be specified in the doc whenever possible?

Actually, destination type names are the same, the
difference is in the options, namely destination dimension
specifications:  in the pdftex driver, they are specified as
the TeX's rule spec, and in dvipdfm in PostScript points.
This is how pdfTeX and dvipdfm want them.

As for the hyperlink types, the pdftex driver supports "num"
hyperlink type (link to a "numbered" destination).  Such
dests are not supported by dvipdfm, so it does not have this
type.  The rest is the same.

Another difference is that for pdftex driver, hyperlinks
have three extra options:  width, height, depth, which
specify dimensions of a hyperlink.  In dvipdfm, it is
possible to specify the dimensions, but it requires using a
different \special from the usual case of automatically
dimensioned hyperlinks, will only work with PDF strings, and
does not fit into the usual \hlstart...\hlend scheme, so I
did not bother to provide it -- I thought nobody would use
it anyway.

> Calling these things (in both lists) "types" seems a little odd, but I
> don't know what other words to suggest.

PDF spec calls them "forms", but to me this would seem even
more odd.  Another possibility is "style", but to me this
word seems to describe how things look, not how they work.

> I'll wait to read the doc :).

The doc is actually ready, I just need to give it another
proofreading and maybe add a few more index entries.  I
expect to send it to you tonight (European time), for the
censorship :).  I hope the doc will clear out many things.

>       xrefn         \refn and \xrefn
>       xref          \xref
>       ref           \ref and \refs
> Maybe combine these?

Alright with me, as long as nobody objects.  In case we do
combine them, we might also combine the destination groups
`xrdef' and `definexref', and call the new groups `xref'.
So we would have a destination group `xref' and a hyperlink
group `xref', which would cover all cross-reference and page
reference macros.  How about this?

> Hyperref can produce back references from citations.

This is actually on my to-do list.  But I think we better
release the hyperlink and LaTeX package stuff first, or it
may never see a release :)

> I find its default
> output (the bare page number) useless

Maybe we just define infrastructure for it, and let the user
define macros which will actually produce what will go into
the backrefs.  This can be a page number, a
chapter/section/subsection, or whatever.  It may be good to
also let the user decide where the backrefs should be
produced, e.g., in the margin.  I'll have to work on this.

> but maybe we should support it with some
> other default output?

But what else do you suggest as a default?  Eplain does not
know anything about the document structure

> I admit I don't like boxed links.
> How about making the default just be another color?

The problem is that when color.sty is not loaded, the links
are not colored.  So if we make no border by default, then,
again by default (without color.sty), the links will not be
marked in any way.  Would this be OK?

> \definecolor{linkcolor}{cmyk}{0.28,1,1,0.35}

This is already the default color, in my local copy of
xeplain.tex, not in CVS (yet).  The only thing, I do not use
the defined color "linkcolor", just direct spec
\color[cmyk]{0.28,1,1,0.35} (of course, redefinable through
hyperlink options), because at the time Eplain is loaded,
there is most probably no \definecolor at all.

Best regards,
Oleg Katsitadze

More information about the tex-eplain mailing list