# How to display a 'not tilde' character [duplicate]

This question already has an answer here:

This doesn't seem to work:

\usepackage{textcomp}
\newcommand{\TextTilde}{\raisebox{0.5ex}{\texttildelow}}

f(n) \not\TextTidle g(n)


It displays the slash before the tilde. Is there any way I can get it to appear over the tilde?

This is where I learned how to make a tilde: Correctly typesetting a tilde

## marked as duplicate by Werner, Kurt, CarLaTeX, Stefan Pinnow, koleygrOct 24 '17 at 23:26

• There is an error in your text, maybe it's because of this: you have written \not\TextTidle, whereas it should have been \not\TextTilde. – Franck Pastor Oct 24 '17 at 18:27
• Why do you want to typeset a "tilde" character into text which seems to belong into a math environment? $f(n) \not\sim g(n)$? – genericFJS Oct 24 '17 at 18:27
• @genericFJS - You should post an answer featuring \not\sim. – Mico Oct 24 '17 at 18:30

Since it seems that you want to use the "tilde" in a mathematical context, the character \sim (for similar) would make more sense:
\documentclass{article}
$f(n) \not\sim g(n)$

• ...or with amssymb you can use \nsim – Andrew Swann Oct 24 '17 at 18:50