I'd like to have underlined urls (with pdflatex, and visible on print-
out and/or monitor), and according the manual (or this:
http://en.wikibooks.org/wiki/Talk:LaTeX/Hyperlinks)
this should be done with
pdfborderstyle={/S/U/W 1}
or
pdfborderstyle={/S/U}
but -- no matter if package- or hypersetup-option -- as this doesn't
show any effect.
And, any pdfborderstyle-config (even pdfborderstyle={} for no border)
shows any change at all, same if I set colorlinks to true or false...
(NB: I've actually got no printer available, and I view my pdfs with
evince or acroread9)
Any ideas?
Minsu
This works for me:
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{hyperref}
\hypersetup{colorlinks=false,pdfborderstyle={/S/U/W 1},pdfborder=0 0 1}
\begin{document}\makeatletter
\section{To See}\label{tosee}
\vskip2cm
\hyperref[tosee]{just to see}
\end{document}\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\Hy@Match{%
% ^%
% ( */Type */Border%
% | */W +\HyPat@NonNegativeReal/%
% | */S */[SDBIU]%
% | */D *\[ *(\HyPat@NonNegativeReal/( \HyPat@NonNegativeReal/)?)?]%
% )* *$}
=> AFAIK, this is the only description of pdfborderstyle key
for hypersetup found in hyperref.pdf
;-)
> %\Hy@Match{%
> % ^%
> % ( */Type */Border%
> % | */W +\HyPat@NonNegativeReal/%
> % | */S */[SDBIU]%
> % | */D *\[ *(\HyPat@NonNegativeReal/( \HyPat@NonNegativeReal/)?)?]%
> % )* *$}
>
> => AFAIK, this is the only description of pdfborderstyle key
> for hypersetup found in hyperref.pdf
> ;-)
http://www.adobe.com/devnet/pdf/pdf_reference.html
And the README contains:
| Link border style
| -----------------
| Links can be underlined instead of the default rectangle or
| options "colorlinks", "frenchlinks". This is done by option
| pdfborderstyle={/S/U/W 1}
|
| Some remarks:
|
| * AR7/Linux seems to have a bug, that don't use the default
| value "1" for the width, but zero, thus that the underline
| is not visible without "/W 1". The same applies for
| dashed boxes, eg.:
| pdfborderstyle={/S/D/D[3 2]/W 1}
|
| * The syntax is described in the PDF specification, look for
| "border style", eg.
| Table 8.13 "Entries in a border style dictionary"
| (specification for version 1.6)
|
| * The border style is removed by
| pdfborderstyle={}
| This is automatically done if option colorlinks is enabled.
|
| * Be aware that not all PDF viewers support this feature, not
| even Acrobat Reader itself:
|
| Some support:
| * AR7/Linux: "underline" and "dashed", but the border width
| must be given.
| * xpdf 3.00: "underline" and "dashed"
|
| Unsupported:
| * AR5/Linux
| * ghostscript 8.50
--
Heiko Oberdiek
I was missing that pdfborder-stuff.
Ok... will that lines also be printed? I read before, boxed links (==>
colorlinks=false) wouldn't...
Also, though I changed urlcolor=black, all my \url{...} and \href{...}
remain cyan.
urlcolor refers to the colorlinks option
use \hypersetup{urlbordercolor=...} (requires package xcolor)
\hypersetup{ ?bordercolor=... }
where ? = cite|file|url|link|menu|run
> | Some support:
> [...]
> | * xpdf 3.00: "underline" and "dashed"
Well... with xpdf 3.02 and the following .tex file:
\documentclass{article}
\usepackage{hyperref}
\hypersetup{pdfborderstyle={/S/U/W 1}}
\begin{document}
\tableofcontents
\section{Foo}
\end{document}
the support seems to be rather /over/ than /under/line. Sigh...
--
Denis
@ Denis: your mwe is also missing the pdfborder-option....
Minsu
> @ Denis: your mwe is also missing the pdfborder-option....
It seems to be unnecessary with most of pdf-viewers on Linux (evince,
okular, epdfview, acroread) and, unfortunately, it doesn't change
anything for xpdf.
--
Denis
Then it must be a new bug in xpdf 3.02. xpdf 3.00 works fine.
--
Heiko Oberdiek
> Then it must be a new bug in xpdf 3.02. xpdf 3.00 works fine.
OK, thanks. I will make a bug report.
--
Denis