# how to put \neq in bookmark

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?

-
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

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.

-
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)

-