<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 9 June 2016 at 14:07, Rodolfo Medina <span dir="ltr"><<a href="mailto:rodolfo.medina@gmail.com" target="_blank">rodolfo.medina@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi to all (La)TeX users.<br>
<br>
Here:<br>
<br>
<a href="http://tex.stackexchange.com/questions/85148/plain-tex-and-different-hyperlink-styles-in-dvi-and-pdf" rel="noreferrer" target="_blank">http://tex.stackexchange.com/questions/85148/plain-tex-and-different-hyperlink-styles-in-dvi-and-pdf</a><br>
<br>
there are some macros (written by Alan U. Kennington) about how to produce<br>
hyperlinks and cross-reference-hyperlinks in plain TeX. I tested them but for<br>
me the link disappears when I convert the dvi format to pdf with: `dvips -z<br>
file.dvi' and then `ps2pdf <a href="http://file.ps" rel="noreferrer" target="_blank">file.ps</a>'. Here is my simple example:<br></blockquote><div><br></div><div>Isn't this identical to the hyperbasics question just asked?<br><br></div><div>as it says at the top of the hyperbasics.tex file the \specials<br></div><div>are inserted in the format required by specific dvi drivers so you have to use<br></div><div>one of those (dvips isn't listed) or edit the file to use specials understood by dvips.<br><br></div><div>hyperbasics is very old, most supported files (such as hyperref) that do this sort of thing have existing options to write out the \specials or \pdfliteral required for different workflows<br></div><div>is there any particular reason to use this package?<br><br></div><div>If you want to make it work you just need to update the specials, eg for the end of a link<br><br></div><div>hyperref has in hyperdef.def<br><br>\def\hyper@anchorend{%<br> \special{html:</a>}%<br> \Hy@activeanchorfalse<br> \Hy@RestoreLastskip<br>}<br><br><br></div><div>which is the special syntax you are using, and in hdvips.def (inputting pdfmark.def)<br><br>\def\hyper@anchorend{%<br> \literalps@out{\strip@pt@and@otherjunk\baselineskip\space H.A}%<br> \pdfmark{%<br> pdfmark=/DEST,%<br> linktype=anchor,%<br> View=/\@pdfview \@pdfviewparams,%<br> DestAnchor=\hyper@currentanchor,%<br> }%<br> \Hy@activeanchorfalse<br> \Hy@RestoreLastskip<br>}<br><br><br><br></div><div>where \pdfmark is defined to use this special<br><br>\def\literalps@out#1{\special{ps:SDict begin #1 end}}%<br><br></div><div>and the pdfmark operator (see \def\pdfmark in pdfmark.def)<br><br></div><div>David<br><br></div><div><br><br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
% This \PreHatch macro to prefix a text string with a hatch character.<br>
{\catcode`\^=6 \catcode`\#=12 \gdef\PreHatch^1{#^1}}<br>
<br>
% Anchor points for cross-reference hyperlinks.<br>
\def\LinkNameText#1#2{%<br>
\special{html:<a name="#1">}#2\special{html:</a>}}<br>
\def\LinkNamePRE#1{\special{html:<a name="#1">}}<br>
\def\LinkNamePOST{\special{html:</a>}}<br>
\def\LinkName#1{\LinkNameText{#1}{}}<br>
<br>
% Cross-reference hyperlinks to defined anchor points.<br>
\def\LinkHrefText#1#2{%<br>
\special{html:<a href="\PreHatch{#1}">}#2\special{html:</a>}}<br>
<br>
% Pre-text and post-text macros.<br>
\def\LinkHrefPRE#1{\special{html:<a href="\PreHatch{#1}">}}<br>
\def\LinkHrefPOST{\special{html:</a>}}<br>
<br>
% External hyperlinks.<br>
\def\LinkHrefExtText#1#2{%<br>
\special{html:<a href="#1">}#2\special{html:</a>}}<br>
\def\LinkHrefExt#1{\LinkHrefExtText{#1}{#1}}<br>
\def\LinkHrefExtTT#1{\LinkHrefExtText{#1}{{\tt#1}}}<br>
<br>
hallo\LinkName{label}<br>
<br>
\LinkHrefText{label}{please click here}<br>
<br>
\end<br>
<br>
, to be processed with simply `tex file'. The link works fine in dvi format<br>
but, as I said, it is no more there after `dvips -z -> ps2pdf' conversion.<br>
<br>
Please help whoever can.<br>
<br>
Thanks,<br>
<br>
Rodolfo<br>
<br>
_______________________________________________<br>
TeX FAQ: <a href="http://www.tex.ac.uk/faq" rel="noreferrer" target="_blank">http://www.tex.ac.uk/faq</a><br>
Mailing list archives: <a href="http://tug.org/pipermail/texhax/" rel="noreferrer" target="_blank">http://tug.org/pipermail/texhax/</a><br>
More links: <a href="http://tug.org/begin.html" rel="noreferrer" target="_blank">http://tug.org/begin.html</a><br>
<br>
Automated subscription management: <a href="http://tug.org/mailman/listinfo/texhax" rel="noreferrer" target="_blank">http://tug.org/mailman/listinfo/texhax</a><br>
Human mailing list managers: <a href="mailto:postmaster@tug.org">postmaster@tug.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><a href="http://dpcarlisle.blogspot.com/" target="_blank">http://dpcarlisle.blogspot.com/</a></div>
</div></div>