0
\chapter[Short Chapter Title \& Lorem\textsubscript{A}]{Long Chapter Title \& Lorem\textsubscript{A}}

warning:

Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `\mathsurround' on input line 1.
Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `\z@' on input line 1.
Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing `subscript' on input line 1.

it is compiling, but I still have the warning. I've seen advice for fixing this for mathmode but I don't want the A to be in mathmode italics

1
  • 3
    LaTeX sometimes tells you that some things don't work inside PDF bookmarks. In this case, it seems like that includes \textsubscript. Mar 18 at 18:03

1 Answer 1

2

You can use \texorpdfstring{<latex-code>}{<bookmark-text>} macro provided by hyperref like this:

\documentclass{article}
\usepackage{hyperref}

\begin{document}
\section{hello \texorpdfstring{\textsuperscript{world}}{world}}
\end{document}
2
  • 2
    You don't have any spaces in either string. Mar 18 at 19:36
  • Ah, okay, do you mean hello world instead of helloworld? Got it, editing right away. Thanks.
    – Niranjan
    Mar 19 at 5:01

Not the answer you're looking for? Browse other questions tagged .