TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used hyperref to make bookmarks. After reading hyperref's manual, I got this example and it worked:

\section{Pythagoras:  \texorpdfstring{$ a^2 + b^2 = c^2 $}{ a\texttwosuperior\ + b\texttwosuperior\ =  c\texttwosuperior}}  

Referring to this example, I used the following but it didn't work:

\subsection{Wind load \texorpdfstring{$\mathsf{Z^{STAAD}}$ -- Direction}{Z\textsuperscript{STAAD} -- Direction}}

Is anything wrong with my code or is there any other method to include superscripts in bookmarks, or is it impossible at all?

share|improve this question
up vote 8 down vote accepted

hyperref needs only text to include in the PDF bookmarks. \textsuperscript expands to something that's not simple text — it contains executable TeX commands and as such can't be simply turned into a sequence of letters. You'll have to replace it with a solution that only contains regular symbols.

First approach: use ASCII characters to approximate the needed effect:

\subsection{Wind load \texorpdfstring{$\mathsf{Z^{STAAD}}$ -- Direction}%
  {Z\^STAAD -- Direction}}

Another approach would be to use Unicode superscript symbols at the risk that some PDF viewers won't have the needed font support to display this. But there doesn't seem to be an uppercase superscript letter S, so this is not applicable here.

Finally, a bit of advice if I may: don't use math, abbreviations and other non-readable things in headings unless really needed. For example, instead of

\section{Proof that $\forall n \in \mathbb N (n > 1 \implies n =
  p_1^{\alpha_1}p_2^{\alpha_2}\ldots p_k^{\alpha_k})$}


\section{Proof that any natural number greater than 1 can be
  represented as a product of prime numbers}
share|improve this answer
according to hyperref's manual, it supports some math in bookmark, but apparently doesn't support all math. so i take your last advice: try not to use whatever special in bookmark. – warem Mar 21 '11 at 8:33
@warem: That's nice to know about the math support! – Andrey Vihrov Mar 21 '11 at 8:37

Your Answer


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.