You get the same result with the hypertex driver of the LaTeX package hyperref.
The hyperTeX specials define some very basic HTML markup, e.g.:
s:[1/1]:: html:<a name="page.1">
s:[1/1]:: html:</a>
s:[1/1]:: html:<a name="Doc-Start">
s:[1/1]:: html:</a>
s:[1/1]:: html:<a name="section*.1">
s:[1/1]:: html:</a>
s:[1/1]:: html:<a href="#section.1">
s:[1/1]:: html:</a>
s:[1/1]:: html:<a name="section.1">
s:[1/1]:: html:</a>
s:[1/1]:: html:<a href="#section.1">
s:[1/1]:: html:</a>
s:[1/1]:: html:<a href="http://www.example.org/">
s:[1/1]:: html:</a>
This is the output of dvii, the TeX source file:
\documentclass{article}
\usepackage[hypertex]{hyperref}
\begin{document}
\tableofcontents
\section{Hello World}
\label{sec:hello}
See section \ref{sec:hello}.
\url{http://www.example.org/}
\end{document}
The hyperTeX specials do not provide configuration options and do not know about PDF.
Thus the link outcome is in control of the DVI program:
xdvi underlines in blue.
dvips -z uses blue boxes.
Configuration of xdvi
There are three options to configure the link outcome, from the manual page of `xdvi`:
-linkcolor
(.linkColor) Color used for unvisited hyperlinks
(`Blue2' by default). Hyperlinks are unvisited be
fore you click on them, or after the DVI file has
been reloaded. The value should be either a valid
X color name (such as DarkGoldenrod4) or a hexadec
imal color string (such as #8b6508).Seealso -visit
edlinkcolor and -linkstyle.
-linkstyle
(.LinkStyle) Determines the style in which hyper
links are displayed. Possible values and their
meanings are:
0 No highlighting of links
1 Underline links with link color
2 No underlining, color text with link color
3 Underline and display text colored with
link color
The values for link color are specified by the op
tions/resources -linkcolor and -visitedlinkcolor
(which see).
-visitedlinkcolor
(.visitedLinkColor) Color used for visited hyper
links (`Purple4' by default). Hyperlinks become
visited once you click on them. As for linkColor,
the value should be either a valid X color name or
a hexadecimal color string.
Configuration of dvips
The border and color are hardcoded, from hps.c:
p->color[0] = 0;
p->color[1] = 0; /* Blue links */
p->color[2] = 1;
p->border[0] = 1; /* horizontal corner radius */
p->border[1] = 1; /* vertical corner radius */
p->border[2] = 1; /* box line width */
p->border[3] = 3; /* dash on size */
p->border[4] = 3; /* dash off size */
As result dvips -z writes the links of the example above as:
(#section.1) [[134 682 210 694] [1 1 1 [3 3]] [0 0 1]] pdfm
(#section.1) [[185 628 190 640] [1 1 1 [3 3]] [0 0 1]] pdfm
[[197 628 318 640] [1 1 1 [3 3]] [0 0 1]] (http://www.example.com/) pdfm
To get different colors, either the definition of pdfm needs to be changed in hps.pro
or the redefinition can be done at later time by manipulating the arguments for pdfm and replacing the arrays for the border and the color.
Or in short, dvips -z cannot be configured without hacking internals.
-linkstyleoption forxdvi(the program I use for dvi preview). But I couldn't find a similar option forevinceto explain the PDF appearance. That would also not explain why the pdf generated withxetexand through dvips+ps2pdf14 have different styles since I useevincefor both. – Mafra Dec 2 '12 at 11:30