[OS X TeX] OT: setting the look of hyperlinks with hyperref
Bob Kerstetter
bkerstetter at mac.com
Mon Mar 29 14:59:45 CEST 2004
On Mar 29, 2004, at 5:02 AM, Bruno Voisin wrote:
> As a follow-on to my own post:
>
>> It works, but I'm confused: is it really necessary to go to such
>> low-level commands (especially in the second case)? Is there an
>> obvious solution or interface that I've missed?
>
> Also, "my" solution also breaks the ability (I'm working in pdfTeX) of
> hyperlinks to be broken across several lines, so it's definitely
> sub-optimal.
>
Hi Bruno,
Maybe I am missing your point here, but this both underlines and wraps
and makes a working hyperlink in 10.3's Preview. Requires the ulem
package. I got the \newcommand{\cuuline} from someone else, maybe the
author of ulem. I don't remember. It's a double underline, but I just
define one color as "white" to make it a single underline.
\documentclass{article}
\usepackage{color} % << color package is required
\usepackage{ulem} % << ulem package is required
%red over blue double under line-- swap red and blue in second line to
make it blue over red
\newcommand{\cuuline}{\bgroup\markoverwith{\hbox{\kern-.03em\vtop%
{\begingroup\kern.2ex\color{blue}\hrule width.2em\kern1.1pt\color{red}%
\hrule\endgroup\kern-.03em}}}\ULon}
\usepackage[colorlinks=true]{hyperref} %goes last to redefine the world.
\begin{document}
%this is asample of the command in use
Steve Jobs says, ``I think
\href{ht½0V£/www.apple.com}{\cuuline{different.}}''.
\end{document}
-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.
More information about the macostex-archives
mailing list