Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like links to appear as coloured underlines in my documents. The following short example produces a pdf that displays the link correctly in Acrobat, but not in Preview. In Preview it shows up as a box:

Is there a way I can get Preview to display the link as an underline using commands in \hypersetup?

\documentclass{article}

\usepackage{hyperref}
\usepackage{xcolor}
\hypersetup{%
    colorlinks=false,
    pdfborderstyle={/S/U/W 1}
}


\begin{document}

\url{www.google.com}

\end{document}
share|improve this question
1  
This isn't specific to OS 10.7 (or even the Mac). Not all PDF viewers support the pdfborderstyle. –  Alan Munn Jun 11 '12 at 2:42
    
Well, that's a pain in the butt. –  Malo Jun 11 '12 at 3:05
    
With OS 10.7, I need to add http:// if I want an active link with Preview, Skim or Safari. Safari says : bad character in the link. I try with \hrefinstead of \url but the problems are the sames with "underline" and "http". Actually, I need to write \href{http://www.google.com}{www.google.com} –  Alain Matthes Jun 11 '12 at 6:20
    
@Altermundus \nolinkurl can be used to get the link typeset in the same way as \url but without the link. Result with complete URL: \href{http://www.google.com/}{\nolinkurl{www.google.com}} –  Heiko Oberdiek Jul 29 '12 at 23:02

1 Answer 1

This isn't specific to OS 10.7 (or even the Mac). Not all PDF viewers support the pdfborderstyle, so if Preview doesn't there's not much that can be done about it. However, in this question: How can I have colored and underlined links with hyperref? there's an answer by doncherry which implements underlining manually via the soul package. This might be an alternative.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.