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.

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

The not equal sign ($\neq$) becomes equal sign(=) in hyperref's bookmark. I know that \texorpdfstring will work for this, but I can not find \textneq, maybe another name?

Thanks in advance.

share|improve this question
Does \newcommand\textneq{\ensuremath{\neq}} work? (i.e. put this in your preamble and then use \textneq in the bookmark? – Seamus Jan 9 '11 at 15:24
This changes nothing. – Ma Ming Jan 9 '11 at 15:29
Not all math symbols are available for text mode – Herbert Jan 9 '11 at 15:36
up vote 11 down vote accepted

Just use the actual ≠ symbol:

\texorpdfstring{$A\neq B$}{A ≠ B}

You need to load hyperref with the [unicode] option for this to work.

Your source file also needs to be UTF-8 encoded.

share|improve this answer
pdflatex get mojibake, xelatex OK. – Ma Ming Jan 9 '11 at 18:25
@Ma Ming: I don't understand your comment. You don't need xelatex for this solution to work. What does 'pdflatex get mojibake' mean? Did the solution work for you? If so, please accept the answer. – Alan Munn Jan 9 '11 at 18:37
@Ma Ming: you need to make sure that the encoding of your input file is UTF-8 (it seems that 'mojibake'=unintelligible characters). – Alan Munn Jan 9 '11 at 19:45
Thanks, I figued out it. xelatex uses unicode by default. – Ma Ming Jan 9 '11 at 22:03

\texorpdfstring is OK. \neq is ≠ (unicode 0x2260)

share|improve this answer

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.