# Using the # symbol in equations

I want to use the # symbol in Latex equations. I already tried \#, but it is not working: When the # symbol appears in an equation, then the rest becomes a $ sign instead of #. Here is my code: ({12#-3-4\div 5#3\%})  • \# should be what you need – egreg Mar 29 '16 at 10:45 • If \# isn't working, you must be loading other font package which is replacing it. – John Kormylo Mar 29 '16 at 14:27 ## 1 Answer In LaTeX #$ % & ~ _ ^ \ { } are treated as reserved characters. If we need to print these characters, we must add backslash before them. This works for

\#
\\$
\%
\&
\_
\{
\}


(not for ^, ~ and \).

For instance, % (percent symbol) is used to comment any content in a document or in a template. To print percent symbol we should type \%

For your problem the solution is to type \#.

• @DavidCarlisle -- since when does \^ print only the circumflex? last time i looked, this was a text accent (and must be put over something), and triggered an error in math. – barbara beeton Mar 29 '16 at 12:39
• sorry meant to say # and % I point but it doesn't work for ^ later in same line:-) I'll delete and re-add – David Carlisle Mar 29 '16 at 12:41
• This answer happens to work for # and % but is wrong for \\ , \^, \~ – David Carlisle Mar 29 '16 at 12:42