Tilde (~, ã) symbol in LaTeX

In this tutorial, I will show you how to get the tilde symbol and use a tilde symbol over a letter in LaTeX.

Short answer:

  • Use $\sim$ command to use the tilde symbol as a symbol.
  • Use $\tilde{a}$ to get this type (over a letter) of output: ã.
  • Use $\widetilde{<char>}$ to get the tilde symbol over multiple letters at once.

Use tilde symbol as a symbol in LaTeX

To use the tilde symbol in text mode you can use the \textasciitilde command and to get this symbol in math mode you can use the \sim command.

Also, some other packages provide commands to get this symbol.

PackageCommandOutput
None$\sim$$\sim$
None\textasciitilde\textasciitilde
amssymb$\thicksim$$\thicksim$
textcomp\texttildelow\texttildelow
\documentclass{article}
\usepackage{amssymb}
\usepackage{textcomp}
\begin{document}

 \noindent \underline{All commands to get tilde symbol}\\
  a $\sim$ b \\
  a \textasciitilde b \\
  a $\thicksim$ c \\
  a \texttildelow b
  
\end{document}

Output:

tilde symbols

Use tilde symbol over a letter in LaTeX

If You want to use the tilde symbol over a single letter you can use the \tilde{<char>} command. And if you want to use the tilde symbol over multiple letters at once then you have to use the \widetilde{<char>} command.

\documentclass{article}
\begin{document}

  \centering\underline{Tilde symbol over a letter with \textbackslash tilde\{\}}\\
  $$ \tilde{a} $$
  $$ \tilde{ab} $$
  $$ \tilde{abc} $$
  \noindent \underline{Tilde symbol over a letter with \textbackslash widetilde\{\}}\\
  $$ \widetilde{a} $$
  $$ \widetilde{ab} $$
  $$ \widetilde{abc} $$
  
\end{document}

Output:

tilde symbol over a letter.

Leave a Reply

Your email address will not be published. Required fields are marked *