16

I'm trying to get the negated \approx sign in LaTeX, as it is in here:

enter image description here

But the \napprox command does not work. Any ideas? Maybe it was switched to a new command? Or do I just need to include some package?

Werner
  • 603,163

2 Answers2

21

The table you show is relative to the symbols provided by mathabx. One can say

\usepackage{mathabx}

but this will change many symbols and not always in a desirable way.

For negated relations one can first try preceding the command by \not:

\not\approx

The placement of the diagonal bar is not always ideal, which is why the negation of \in has its own command \notin. In the case of \not\approx there is no problem.

Here's a visual comparison: above the normal rendition of the symbol, using Computer Modern Math Symbols, below the mathabx rendition. A difference in shape is evident.

enter image description here

egreg
  • 1,121,712
11

Unless a font is used that contains the glyph (U+2249 NOT ALMOST EQUAL TO), the symbol is constructed by the two relational symbols \not and \approx. The appearance looks o.k., but the result from "copy & paste" is "suboptimal". This can be improved by package accsupp that uses the ActualText feature of PDF (for PDF viewers that support this feature such as Acrobat Reader):

\documentclass{article}
\usepackage{accsupp}
\providecommand*{\napprox}{%
  \BeginAccSupp{method=hex,unicode,ActualText=2249}%
  \not\approx
  \EndAccSupp{}%
}
\begin{document}
\[ a \napprox b \]
\end{document}

Result

Result from "copy & paste" (AR9/Linux): a ≉ b

Heiko Oberdiek
  • 271,626
  • It's nice that \BeginAccSupp and \EndAccSupp don't add items to the math list, so the spacing is correct (tested with a binary operator). – egreg May 31 '13 at 18:06
  • @egreg Yes, just whatsits are inserted (\pdfliteral or \special), no boxes. And I prefer \begingroup ... \endgroup for grouping. Curly braces for grouping would interfere by adding a subformula. – Heiko Oberdiek May 31 '13 at 21:30