1

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, koleygr Oct 24 '17 at 23:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    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
  • 1
    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
5

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}
\begin{document}
$f(n) \not\sim g(n)$
\end{document}

In that context, there is no need to typeset the "tilde" character as text.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.