0

I have a problem with \href. I define an email address with \newcommand{\Authoremail}{author@example.org} but when I use \href{mailto:\Authoremail}{\Authoremail} and click on the link in the PDF, the email address that is shown in Outlook is wrong and has some additional code.

4

The mailto: prefix of the email URI is missing:

\documentclass{article}
\usepackage{hyperref}

\newcommand*{\Authoremail}{author@example.org}

\begin{document}
  \href{mailto:\Authoremail}{\Authoremail}
  or
  \href{mailto:\Authoremail}{\nolinkurl{\Authoremail}}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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