
Reposting with the correct attachment.
Il 22/02/2011 14:22, Enea Zaffanella ha scritto:
When producing a PDF file with PDF_HYPERLINKS = yes, the latex generated by a template class documentation such as
//! A template class. template <typename T> class Templ { T a; };
generates the following LaTeX:
\hypertarget{classTempl}{ \section{Templ$<$ T $>$ Class Template Reference} \label{classTempl}\index{Templ@{Templ}} }
which results in the following warning:
Package hyperref Warning: Token not allowed in a PDF string (Unicode): (hyperref) removing `math shift' on input line 4.
The problem is in the use of `$' inside a hypertarget.
The attached patch solves this issue by adding a boolean status flag (insideHypertarget) to classes LatexGenerator and LatexDocVisitor.
NOTE: the patch only addresses the cases of $<$ and $>$. It might be worth to consider whether or not other mathematical symbols produced by function LatexDocVisitor::visit(DocSymbol *s) could occur inside a hypertarget (and hence should be guarded using the same technique).
Regards, Enea.