LaTeX forum ⇒ Text Formattingmailto

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

Postby JudMc » Mon Feb 04, 2019 6:08 am

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.

User avatar
Johannes_B
Site Moderator
Posts: 3953
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Feb 04, 2019 8:05 am

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

Postby JudMc » Mon Feb 04, 2019 8:28 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

Postby JudMc » Mon Feb 04, 2019 9:22 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?

User avatar
Johannes_B
Site Moderator
Posts: 3953
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Feb 04, 2019 7:46 pm

Apart from the table of contents LaTeX creates (which contain links if you use hyperref), there is also the pdf-bookmarks.
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.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9285
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Feb 05, 2019 12:07 am

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
Site admin


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 9 guests