This article aims to show you a simple way to create a degree symbol in LaTeX.
Most of the time you see this symbol together with the letters C or F, and on some occasions with numbers, referring to temperatures and angles respectively, used in math areas and physics and chemistry. Today you are going to learn how to write it in your LaTeX document
Degree Symbol
This symbol has a wide variety of use, mainly to represent degrees of arc and degrees of temperature. You will always see it together with some number or letter depending on the context. For example
\documentclass{article}
\begin{document}
\begin{center}
The road is heading 45$^{\circ}$ N\\
The temperature in the room is $20^{\circ} $ C\\
The angle in the figure is $\theta=90^{\circ}$
\end{center}
\end{document}
LaTeX degree symbolÂ
In LaTeX generating the degree symbol is quite easy, but with a catch, you are using a circle as a superscript, thus you need the math mode. The default command for the circle is \circ. If we take the circle as a superscript the command would be ^{\circ} inside the math mode. For example
$212^{\circ}$ F = $100^\circ$ C
This is done without any packages, but in LaTeX someone already created a package to make things easier (or more difficult). And it does not need values ar argument
Degree command with packages
To write the degree symbols with LaTeX packages there are many options, the ones you will learn are generated by, gensymb, siunitx, and textcomp. Each package has its own degree commands.
Starting with gensymb the command is \degree, and it does not need the math mode enabled. For example
\usepackage{gensymb}
\begin{document}
\begin{center}
Rockets are launched with an 90\degree angle.\\
Water freezes at $0\degree$ C or 32\degree F.
\end{center}
\end{document}
Following with the siunitx package, the command is \ang{} it is the only command in this post that requires a value as argument.Â
\usepackage{siunitx}
\begin{document}
A triangle has three \ang{60} angles.\\
$\angle{QC} = \ang{45}$
\end{document}
Lastly there is the textcomp package, the command is \textdegree. For example
\usepackage{textcomp}
\begin{document}
Water boils at 212\textdegree F or 100\textdegree C.\\
You can move from 43\textdegree W to 25\textdegree S.
\end{document}
Now you have 4 different ways, with various packages, to generate the LaTeX degree symbol for whatever purpose you may need it, whether a right angle, a temperature or direction. But be aware of some compatibility issues if you are working with multiple packages.
I hope this post was helpful. If you have any questions leave them in the comments.Â
And, as always, keep writing in LaTeX
Further Reading
LaTex Tutorial on Symbols
- How To Create A Cross Product Symbol In LaTeX
- How to create a hat symbol in LaTeX?
- How to create a prime symbol in LaTeX?
- How to create an absolute value symbol in LaTeX?
- How to create an approximate symbol in LaTeX?
- How to create an intersection symbol in LaTeX?
- How to create the empty set symbol in LaTeX?
- How to write a dot product in LaTeX?
- How to Write a Greater Than Symbol in LaTeX?
- How to write a norm symbol in LaTeX?
- How to write A Plus-Minus Symbol in LaTeX
- How to write a proportional to symbol in LaTeX?
- How to write a real number symbol in LaTeX?
- How to write a tilde symbol in LaTeX?
- How to write a union symbol in LaTeX?
- How to write a vector in LaTeX?
- How to write an infinity symbol in LaTeX?
- How to write bold text in LaTeX?
- How To Write Dots Symbols In LaTeX?
- How to write the arrow symbols in LaTeX
- How to write the Degree celsius symbol in LaTeX?
- How to write the equal or not equal symbol in LaTeX?
- How to write the Euro symbol in LaTeX?
- How to write the floor symbol in LaTeX?
- How to write the gradient operator symbol in LaTeX
- How To Write The Greater Than Or Equal To Symbol In LaTeX?
- How to write the integer number symbol in LaTeX?
- How to write the less than symbol in LaTeX?
- How to write the Natural numbers symbol in LaTeX?
- How to write the parallel symbol in LaTeX?
- How to write the percent symbol in LaTeX?
- How to write the square root symbol in LaTeX?
- How To Write The Symbol For A Subset In LaTeX?
- How to write the symbol for therefore in LaTeX?
- How to write with the mathbb in LaTeX?