[tex-eplain] pdftex vs. `dvips -> ps2pdf': hyperlinks

Rodolfo Medina rodolfo.medina at gmail.com
Thu Jul 14 13:54:35 CEST 2016

Rodolfo Medina <rodolfo.medina at gmail.com> writes:

> However, though, I see that hyperlinks under pdftex locate the target much
> more precisely, with accuracy of fire of a line, whereas with ps2pdf the
> accuracy of fire is one page or half a page.  Now, my question is: do you
> think it would be possibile, and how?, to have the same hyperlinks accuracy
> also with ps2pdf?

Karl Berry <karl at freefriends.org> writes:

>  Please send me an example of the positioning problem, and I will insert in
> my queue appropriately :).

Hi Karl, hi Philip, hi all Eplain TeXperts and scientists.  I'm attaching
file1.tex and file2.tex for when you have time to look at them.  Process the
first one with:

 $ tex file1
 $ dvips -z file1
 $ ps2pdf file1.ps

and the second with simply `pdftex file2'.  Then do: `xpdf file1.pdf' or `xpdf
file2.pdf', go to page 2 and click the hyperlink.  The difference between
file1.pdf and file2.pdf in accuracy in striking the target is more evident if
you enlarge enormously by hitting `+'.  The same difference is also visible if
you process file2.tex with `dvips -z -> ps2pdf' rather than pdftex.

Thanks, cheers,


%%% file1.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\catcode`\^=6 \catcode`\#=12 \gdef\PreHatch^1{#^1}}
\def\hyperlabel#1{\special{html:<a name="#1">}\special{html:</a>}}
\def\hyperlink#1#2{\special{html:<a href="\PreHatch{#1}">}#2\special{html:</a>}}



\hyperlabel{label}This is page 1.


This is page 2.  Let's go to page 1.  \hyperlink{label}{Please click here.}

%%% end of file1.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% file2.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input eplain




\hldest{xyz}{}{label}This is page 1.


This is page 2.  Let's go to page 1.  \hlstart{name}{}{label} Please click

%%% end of file2.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

More information about the tex-eplain mailing list