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

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

1 Answers1

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}

Niranjan
  • 3,435