Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using mhchem for chemical formulas. In the body of the text it is fine, but it is given me nasty outputs for the titles on the index of my pdf reader. I have tried different ones and the result comes to be the same. Instead of \ce{IrO2} it appears 3222378.

Has someone encountered a similar problem?

share|improve this question
    
It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems is fun, setting them up is not. Then those trying to help can simply cut and paste your MWE and get started on solving problem. –  Peter Grill Oct 11 '12 at 18:02

1 Answer 1

up vote 13 down vote accepted

The problem is that bookmarks can't handle things like math, colors, or font changes. You can use \texorpdfstring; the first argument will be used in the document and the second one will be used in the bookmarks:

\documentclass{article}
\usepackage{mhchem}
\usepackage{hyperref}

\begin{document}

\section{\texorpdfstring{\ce{IrO2}}{Ir02}}

\end{document}
share|improve this answer
1  
Thank you for the hint. Finally, as the chemical formulas I am using as very simple, I've decided to use in line formulas, like IrO$_2$, for my titles. –  ziulfer Oct 12 '12 at 7:39

Your Answer

 
discard

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.