How do you put a tilde(ã, õ, and ñ) over a letter in LaTeX?

There are many uses of the tilde symbol. But, the most important thing is to use the tilde symbol over a letter.

In latex, \tilde and \~{} are two important commands for this. And these are the default commands of LaTeX.

\documentclass{article}
\begin{document}
  \[ \tilde{a} \]
\end{document}

Output :

ã

But, \~{} command must be used in text mode. For example

\documentclass{article}
\begin{document}
   Symbol over a: \~{a}
\end{document}

Output:

Symbol over a: ã

Notice if you know Spanish and Portuguese, this tilde symbol is used over special ‘n’, ‘a’, and ‘o’ letters. For example

\documentclass{article}
\begin{document}
  % use tilde symbol in spanish
    ara$\tilde{n}$a \\ [6pt]
    ni\~{n}o \\ [6pt]
  % use tilde symbol in Portuguese
   canç$\tilde{a}$o \\ [6pt]
   var\~{o}es  
\end{document}

Output :

latex tilde symbol over a letter 

You look at the output above when you pass a character(n, a, and o) in the \tilde command. Then, converting to italic style is not entirely accurate.

However, \~{} command does not change the style of the font. and this is the best practice in the case of language.

Use a tilde symbol over a letter

However, some characters are larger than the size of other characters, so it is best practice to use \widetilde commands instead of \tilde and \~{} commands.

\documentclass{article}
\begin{document}
  \[ \tilde{m} \] 
  \[ \tilde{w} \]
 % use widetilde command
  \[ \widetilde{m} \] 
  \[ \widetilde{w} \] 
\end{document}

Output :

Use widetilde command for responsive tilde symbol

Because look at the output above, the size of the tilde symbol is also constant in the case of \tilde and \~{} commands. However, in the case of the \widetilde command, the tilde symbol is responsibly placed over a letter.

In my opinion, the \widetilde command is best for using tilde symbols on all capital letters.

\documentclass{article}
\begin{document}
  \[ \tilde{N} \;\; \widetilde{N} \] 
  \[ \tilde{A} \;\; \widetilde{A} \]
  \[ \tilde{O} \;\; \widetilde{O} \] 
\end{document}

Output :

Use responsive tilde symbol over a capital letter

However, you must use the \widetilde command for multiple characters. For example

\documentclass{article}
\begin{document}
  \[ \tilde{ac} \;\; \widetilde{ac} \] 
  \[ \tilde{pq} \;\; \widetilde{pq} \]
  \[ \tilde{abc} \;\; \widetilde{abc} \] 
\end{document}

Output :

use tilde symbol over multiple letter

Share tutorial

Leave a Comment

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