I'm using hyperref, which causes trouble when having math in my section title.
MWE:
\documentclass{report}
\usepackage{hyperref}
\usepackage{fixltx2e}
\begin{document}
\section{Basis for CO\texorpdfstring{\textsubscript{2}{ h}} heat}
\section{Basis for CO\texorpdfstring{\textsubscript{2}} heat}
\section{Basis for CO\texorpdfstring{$_2$} heat}
\end{document}
The first text line will be displayed correctly, but why do I have to add { h} (I know this is not the correct solution, but it works)? If I don't, the space and the h will disappear. I found out that I had to add it by trial and error. How should this be done?
\texorpdfstringtakes two arguments: the first is typeset into the document, the second one is put in the bookmark. So\textorpdfstring{\textsubscript{2}}{2}for example. – Qrrbrbirlbel Jun 07 '15 at 20:14\textsubscriptis defined (which neitherreportnorhyperrefnorfixltx2e(deprecated anyway) do). – Qrrbrbirlbel Jun 07 '15 at 20:19\textsubscriptwas a standard thing. How should it be defined? – ROLF Jun 07 '15 at 20:27\textsubscriptis now in the LaTeX kernel (01/2015). You should redo your formats. – Bernard Jun 07 '15 at 21:33