LaTeX provides several methods to insert the degree (°) symbol into your document. Follow these steps to use the recommended approaches.
Method 1: Using the ‘gensymb’ Package
Open your LaTeX document in an editor of your choice.
Add the following line to the preamble of your document to include the gensymb
package:
\usepackage{gensymb}
Now, you can use the \degree
command to insert the degree symbol wherever needed in your document.
For example,
\documentclass{article}
\usepackage{gensymb}
\begin{document}
As I stepped outside, I was greeted by a crisp autumn morning, the temperature hovering around 15$\degree$ Celsius. The gentle breeze carried the scent of fallen leaves, and the sunlight warmed the landscape. I decided to enjoy my morning coffee on the porch, feeling the 15$\degree$ air against my skin. It was the perfect weather to savor the changing seasons, with the subtle chill reminding me that winter was approaching. The degree symbol captured the moment's essence, symbolizing the delicate balance between warmth and coolness that defined that particular morning.
\end{document}
Output
Method 2: Using the ‘textcomp’ Package
Open your LaTeX document in an editor.
Add the following line to the preamble to include the textcomp
package:
\usepackage{textcomp}
You can now use the \textdegree
command to insert the degree symbol.
For example,
\documentclass{article}
\usepackage{textcomp}
\begin{document}
In the serene beauty of the countryside, I ventured out for a morning walk. The air was crisp, with the temperature lingering around 10\textdegree C. The rustling leaves underfoot, and the gentle breeze carried the unmistakable scent of autumn. As I strolled, the sun cast its golden rays, creating a warm ambiance. It was a perfect morning, and the degree symbol encapsulated the cool tranquility that embraced the landscape, marking the arrival of fall.
\end{document}
Output
Method 3: Using “\circ” in the ‘amsmath’ package
Open your LaTeX document.
Including a degree symbol in LaTeX can also be accomplished using the \circ
command available through the amsmath
package. To show the degree symbol, you need to write the following:
$^{\circ}$
This will produce the degree symbol in your text. For example,
\documentclass{article}
\usepackage{amsmath}
\begin{document}
As the sun dipped below the horizon, I saw the breathtaking sunset atop a hill. The temperature had dropped to a comfortable 20$^\circ$ Celsius, and a gentle breeze whispered through the surrounding trees. The hues of the sky transitioned from warm oranges to cool purples, creating a mesmerizing spectacle.
\end{document}
Output
Method 4: Using the ‘siunitx’ Package
To utilize the degree symbol in LaTeX for angles, the \ang{}
command from the siunitx package can be employed. Here is an example of how to use it:
\documentclass{article}
\usepackage{siunitx}
\begin{document}
As the sun dipped below the horizon, I saw the breathtaking sunset atop a hill. The temperature had dropped to a comfortable \ang{20} Celsius, and a gentle breeze whispered through the surrounding trees. The hues of the sky transitioned from warm oranges to cool purples, creating a mesmerizing spectacle.
\end{document}
Output
Final Words
Choose the method that best fits your needs or matches the packages you already use in your LaTeX document. Whether it’s the gensymb
package, textcomp
package, amsmath
package, or siunitx
package, you can easily include the degree (°) symbol in your LaTeX documents.