## LaTeX forum ⇒ Text Formatting ⇒ mailto

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
JudMc
Posts: 4
Joined: Mon Feb 04, 2019 6:01 am

### mailto

Hello, I'm new here and have been using LaTeX in a small way for a few months, using Texmaker.

I adapted this line from someone else's TeX file:

\href{mailto:jud@xyz.com}{\tt jud@xyz.com}

Texmaker gives the error message:
! Undefined control sequence.<recently read> \href \href
and it puts all of that text into the PDF file.

I have no idea of what is not working. Can someone help? Thank you.

Johannes_B
Site Moderator
Posts: 3952
Joined: Thu Nov 01, 2012 4:08 pm
You have to add \usepackage{hyperref} just before \begin{document}.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

JudMc
Posts: 4
Joined: Mon Feb 04, 2019 6:01 am
Yes, that works. Thank you, there is a lot to know about TeX, etc.

JudMc
Posts: 4
Joined: Mon Feb 04, 2019 6:01 am
But here is something that may be related to hyperref. I think I started getting warnings on this line after I added hyperref:

\section{The sets $T^*(s)$ for various $s$}

Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing 'superscript' (2 of these)
Token not allowed in a PDF string (PDFDocEncoding):(hyperref) removing 'math shift' (4 of these)

It shows up correctly in the PDF file. Is this a problem?

Johannes_B
Site Moderator
Posts: 3952
Joined: Thu Nov 01, 2012 4:08 pm
They should only contain simple text, no maths, i.e. no superscripts. Please have a look at section 4.1.2 Replacement macros of the hyperref documentation.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9277
Joined: Mon Mar 10, 2008 9:44 pm
As Johannes said, and write it as approximation text for bookmarks like

\section{The sets \texorpdfstring{$T^*(s)$ for various $s$}{T*(s) for various s}}

Stefan