# How to use maths symbols in text mode?

I try to add a center dot with \circ but it fails to compile. How to use maths symbol in text mode? The error message is

ovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo))
(./untitled-1.aux)
! Missing $inserted. <inserted text>$

-

## migrated from stackoverflow.comMar 11 '13 at 11:20

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Torbjørn T. Mar 11 '13 at 11:25

By default LaTeX is in text mode. In LaTeX all mathematics needs to be inside some maths mode contruction and many symbols, including \circ, are defined to only work in maths mode.
As the other anwsers show the standard way to cope with this is to place \circ between dollar signs: $\circ$. An alternative, that may become the default in future, is to use $$\circ$$. Single dollar $ toggles between math and text mode; $$ switches to maths mode from text mode and issues an error otherwise. See Are \( and$$ preferable to dollar signs for math mode? for some discussion. (Another choice that could be useful is \ensuremath{\circ}, but this is more a programming construction.) On the other hand \circ may not be producing the symbol you wish. A simple dot that is vertically centered is produced by \cdot: \documentclass{article} \begin{document} Some text $$\circ$$ and more and a centered dot $$\cdot$$ and more. \end{document}  See How to look up a symbol? for discussion on finding symbols. Note that you will find that some symbols have variants starting with \text... that can be legitimately used in text mode. - Why can the \ldots work in text mode while \cdots cannot? – kiss my armpit Mar 11 '13 at 15:19 In standard LaTeX \ldots is \dots is \ifmmode\mathellipsis\else\textellipsis\fi so has a text and math version. On the other hand \cdots is \mathinner{\cdotp\cdotp\cdotp} a math only construction. (Additionally \cdotp is {\mathpunct}{symbols}{"01}, \cdot is {\mathbin}{symbols}{"01}, also math constructions.) – Andrew Swann Mar 11 '13 at 15:35 OK. Thank you.. – kiss my armpit Mar 11 '13 at 15:59 With the textcomp package there is \textperiodcenter – egreg Mar 11 '13 at 18:41 @egreg Oh, yes - and \textopenbullet - I which one the poster wanted.? – Andrew Swann Mar 11 '13 at 18:48 You can enclose math in between dollar signs, like this: some text$\circ$more text.  or some text$E=MC^2$more text.  or some text$\hat x$more text.  - You need to enclose it in $...$. Try $\circ\$.