Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get an href with mailto to function properly in a pdf with an underscore in the email address?

625 views
Skip to first unread message

sherifffruitfly

unread,
Oct 28, 2009, 3:35:21 AM10/28/09
to
Hi all,

I've googled this up, and the only apparently relevant tip I see it to
put a whack in front of the underscore. I don't see that it makes any
difference - the following snippets all result in the same pdf for me:

\href{mailto:see\_d\_j...@yahoo.com}{see\_d\_j...@yahoo.com}
\href{mailto:see_...@yahoo.com}{see\_d\_j...@yahoo.com}

Both of them result in a mailto link for "@yahoo.com", which clearly
is not what I want.

How do I get "see_...@yahoo.com" as a mailto link in my latex
compiled into pdf?

I'm using miktex2.8, and winedt 5.6

Thanks for any hints!

Joseph Wright

unread,
Oct 28, 2009, 4:05:54 AM10/28/09
to sherifffruitfly

\documentclass{article}
\usepackage{underscore,hyperref}
\begin{document}
\href{mailto:see_...@yahoo.com}{see_...@yahoo.com}
\end{document}

works for me.
--
Joseph Wright

sherifffruitfly

unread,
Oct 28, 2009, 10:50:26 AM10/28/09
to
On Oct 28, 1:05 am, Joseph Wright <joseph.wri...@morningstar2.co.uk>
wrote:

> On Oct 28, 7:35 am, sherifffruitfly <sherifffruit...@gmail.com> wrote:
>
>
>
> > Hi all,
>
> > I've googled this up, and the only apparently relevant tip I see it to
> > put a whack in front of the underscore. I don't see that it makes any
> > difference - the following snippets all result in the same pdf for me:
>
> > \href{mailto:see\_d\_...@yahoo.com}{see\_d\_...@yahoo.com}
> > \href{mailto:see_d_...@yahoo.com}{see\_d\_...@yahoo.com}

>
> > Both of them result in a mailto link for "@yahoo.com", which clearly
> > is not what I want.
>
> > How do I get "see_d_...@yahoo.com" as a mailto link in my latex

> > compiled into pdf?
>
> > I'm using miktex2.8, and winedt 5.6
>
> > Thanks for any hints!
>
> \documentclass{article}
> \usepackage{underscore,hyperref}
> \begin{document}
> \href{mailto:see_d_...@yahoo.com}{see_d_...@yahoo.com}

> \end{document}
>
> works for me.
> --
> Joseph Wright

Aargh. I was able to get it to work by hitting the "pdftexify" button,
rather than texify button followed by the dvi->pdf button.

I guess now would be a good time for me to figure out what the
difference is.

Thanks for looking!

-sff

Ulrike Fischer

unread,
Oct 28, 2009, 11:30:59 AM10/28/09
to
Am Wed, 28 Oct 2009 07:50:26 -0700 (PDT) schrieb sherifffruitfly:


> Aargh. I was able to get it to work by hitting the "pdftexify" button,
> rather than texify button followed by the dvi->pdf button.
>
> I guess now would be a good time for me to figure out what the
> difference is.

The dvi->pdf button probably calls dvipdfm(x). You must tell
hyperref that you are using this driver by adding the correct driver
option (see manual) e.g. \usepackage[dvipdfmx]{hyperref}. As a
default hyperref assumes that dvips is used if you are producing a
dvi first.


--
Ulrike Fischer

sherifffruitfly

unread,
Oct 28, 2009, 4:17:10 PM10/28/09
to

Thanks for the hint.

http://www.tug.org/applications/hyperref/manual.html#x1-70003.3

I'll look up the differences between the drivers on my own - your
remark was plenty to get me started.

Thanks again!

Herbert Schulz

unread,
Oct 29, 2009, 5:00:23 PM10/29/09
to
In article
<c7e0cb87-e8e0-4e60...@h14g2000pri.googlegroups.com>,
sherifffruitfly <sheriff...@gmail.com> wrote:

Howdy,

I used pdflatex with the command

\href{mailto:see...@yahoo.com}{see\_d\_d...@yahoo.com}

(note that the mailto: has _ directly while the printed part has the \_
commands.\) and it worked fine.

Good Luck,
Herb Schulz

0 new messages