Degree symbol (90° or °C) in LaTeX
In LaTeX, you can print the degree (°) symbol in multiple ways. However, you can notice different outputs for different methods. In this tutorial, I will show you all of those methods to write degree symbol in LaTeX.
All the packages and commands
This table will help you choose your preferred package and command to print the degree symbol in LaTeX.
Package | Command | Output |
---|---|---|
None | $0^\circ$ | 0° |
gensymb | 0\degree | 0° |
gensymb | $0\degree$ | 0° |
textcomp | 0\textdegree | 0° |
textcomp | 0\textcelsius | 0°C |
siunitx | \ang{0} | 0° |
Degree symbol without package
You can use the default command \circ
, which will print a small circle symbol. Now you have to use this symbol in superscript. This command works in LaTeX math mode.
\documentclass{article} \begin{document} $$ \verb|30^\circ C| \rightarrow 30^\circ C $$ $$ \verb|\angle 90^\circ| \rightarrow \angle 90^\circ $$ \end{document}
Output:
Degree symbol in LaTeX text mode
In order to print the degree symbol in text mode you can use the \ang(<value>)
from siunitx
package or \textdegree
from textcomp
package. These commands give you slightly different outputs. Take a look.
\documentclass{article} \usepackage{siunitx} \usepackage{textcomp} \begin{document} \verb|\ang{30} C| $\rightarrow$ \ang{30} C\\[4pt] \verb|30\textdegree C| $\rightarrow$ 30\textdegree C\\[4pt] \verb|\angle \ang{90}| $\rightarrow$ \angle \ang{90}\\[4pt] \verb|\angle 90\textdegree| $\rightarrow$ \angle 90\textdegree \end{document}
Output:
Leave a Reply