1

I have written a text in documentclass book and I have quite a lot of maths into subsections titles. These titles are of course correctly rendered in the pdf page but are not in the bookmarks: for example here it appears 2tt2+1 instead of what we'd expect out of $\frac{2t}{t^2+1}$. In particular fractions and powers make the issue.
An excerpt of my logfile with some variants of the warn:

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `math shift' on input line 189.
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `math shift' on input line 189.
[17] [18]
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `math shift' on input line 243.
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                \kern 2.16713pt
(hyperref)                removed on input line 243.

I have read the answers to this question because my warnings all look a lot like the second and third warning mentioned there, but then I got errors both using \texorpdfstring+\texttwosuperior to try to fix powers, and also when adding options pdfencoding=auto,psdextra to hyperref package.
Is there a way to fix at least a part of such warnings?
I use MikTeX 2.9 and TeXnicCenter.

Known that the question is the one above, I think this would affect the quality of the pdf only sideways, would you agree with it, in typography/LaTeX point of view?


Sorry if I wrote inappropriately, I had met this question before but I am not using beamer and my problem is not with author or metadata. My doubt was more related with this topic I linked above. Anyway after comments in this page I had a sensible improvement in my pdf output.
MattAllegro
  • 1,546
  • 3
    There's no typesetting possible in bookmarks, so all you can have is an approximate representation, such as \texorpdfstring{$\frac{2t}{t^2+1}$}{2t/t\textasciicircum2+1} (use the unicode option to hyperref). – egreg Apr 14 '14 at 11:53
  • @egreg I'm sorry master, but I get 18 errors again when typing \usepackage[unicode]{hyperref} or \usepackage[pdfborder=0,unicode]{hyperref} instead of \usepackage[pdfborder=0]{hyperref} – MattAllegro Apr 14 '14 at 12:04
  • Please, add a minimal example of code showing the issue to the question. – egreg Apr 14 '14 at 12:20
  • \subsection{Equazione omogenea \texorpdfstring{$y'=\frac{2t}{t^2+1}y$}{y'=(2t/t\textasciicircum2+1)y}} \subsection{Equazione omogenea $y'=\frac{2t}{t^2+1}y$}\label{2p1p2a} works very well as you said but without the unicode option! – MattAllegro Apr 14 '14 at 12:25
  • @egreg Yes, I compiled with option unicode commented and it works properly on my system...we have an answer I'd say... – MattAllegro Apr 14 '14 at 12:32
  • \subsection{Equazione omogenea \texorpdfstring{$y'=\frac{2t}{t^2+1}y$}{y'=(2t/t\textasciicircum2+1)y}\label{2p1p2a} without the unicode option is correct, this is final, with correct braces also. – MattAllegro Apr 14 '14 at 23:33

0 Answers0