How to Insert a # Symbol (Hashtag or Number Sign) in LaTeX
You can write a number sign symbol in a LaTeX by typing \#
.
You can use it the same way in an equation envrionment by typing \(\# \)
or $\#$
.
If you do not escape the number sign you will get the error message shown in listing 2.
\documentclass{article}
\begin{document}
This is a Text containing a number sign symbol $\#$. It is done using an inline equation.
If you write the number sign without inline equation context it looks like this \#.
\end{document}
! You can't use `macro parameter character #' in horizontal mode.
l.4 ...nline equation context it looks like this #

The Hashtag Symbol in Social Media
Since 2007 the numbering sign is used in social media to annotate tags.
how do you feel about using # (pound) for groups. As in #barcamp [msg]?
— ˗ˏˋ Chris Messina ˎˊ˗ (@chrismessina) August 23, 2007