Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have encountered a hyperref warning but there are no visible negative consequences. Additionally, LaTeX complete without a complaint. I only found the warning by looking at the .log file.

Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref)                than one, level fixed on input line 2366.

and

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `math shift' on input line 2206.

and

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `superscript' on input line 2200.

Does anyone know what this means?

Those lines don't correspond to references either.

share|improve this question

1 Answer 1

up vote 11 down vote accepted
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref)                than one, level fixed on input line 2366.

The first warning can be caused by missing section levels. For example, a \subsubsection following a \section. If this is intentional, then I recommend package bookmark. It implements the bookmark managing in a robuster way that can deal with missing section levels. It is loaded after package hyperref:

\usepackage{hyperref}
\usepackage{bookmark}

Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref)                removing `math shift' on input line 2206.

This means, you have $ in the bookmark. Math is typeset by TeX that is not available by PDF viewers. If the bookmark title is ok, then you can ignore the warning. Otherwise an alternative string representation for the bookmark title can be given by \texorpdfstring:

\texorpdfstring{$E=mc^2$}{E=mc\texttwosuperior}

For larger support of math symbols I recommend Unicode encoding for bookmark titles, set by option unicode or pdfencoding=auto, and the new option psdextra:

\usepackage[pdfencoding=auto,psdextra]{hyperref}
share|improve this answer
    
I added \usepackage{bookmark} and the options to hyperref. I now have an option clash with hypcap. In my preamble, I have hyperref then hypcap with the option all. –  dustin Jun 14 '13 at 0:10
2  
Load package bookmark after hyperref, because bookmark requires hyperref and loads it without options. This causes an option clash, if hyperref is loaded later with options. –  Heiko Oberdiek Jun 14 '13 at 0:18
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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