You are all familiar with the degree Celsius (°C) symbol, which is formed by placing (°) next to the letter C.
In LaTeX, there is no predefined command for the Celsius (°C) symbol. However, you can create it by combining C with (°). For example:
\documentclass{article}
\begin{document}
\[ ^\circ C \]
\[ {25}^\circ C \]
\end{document}
Output :
Using textcomp and mathcomp Packages for °C
The textcomp and mathcomp packages offer predefined commands \textcelsius
and \tccentigrad
for the Celsius symbol.
Alternatively, in textcomp, you can create it by combining C with \textdegree
.
\documentclass{article}
\usepackage{textcomp,mathcomp}
\begin{document}
51 $\tccentigrade$
25 \textdegree C \\
49 \textcelsius
\end{document}
Output :
Use siunitx package for °C
The syntax for this \SI
command is slightly different, and temperature values and \celsius
or \degreeCelsius
commands are used as arguments.
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\[ \SI{49}{\celsius} \]
\[ \SI{25}{\degreeCelsius} \]
\end{document}
Output :