Text Formattingmailto

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

mailto

Post by JudMc »

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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

mailto

Post by Johannes_B »

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

mailto

Post by JudMc »

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

mailto

Post by JudMc »

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: 4182
Joined: Thu Nov 01, 2012 4:08 pm

mailto

Post by Johannes_B »

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: 10335
Joined: Mon Mar 10, 2008 9:44 pm

mailto

Post by Stefan Kottwitz »

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
LaTeX.org admin
Post Reply