# How to make theta symbol?

I try to write (x,y,\theta) but I get an error that says, "Missing $inserted". If I remove \theta the error disappears. What is wrong? • \theta is a macro that need to be used within a math-mode. So you should use $(x,y,\theta)$ to create an in-line mathematical environment (or replace $s by $ (opening) and $ (closing) for centered formula in a new line). Or if you don't want to use math-mode, you can have a look on how to use greek letters in text without changing to math mode – ebosi Jun 10 '16 at 13:34

\theta is defined in math mode which is why TeX makes the announcement $inserted. If what you type is indeed a formula, surround it with $:

$(x, y, \theta)$


If it is normal text, the correct input depends a bit on whether you use (normal) (La)TeX or e.g. XeLaTeX (or other compiler that understands unicode input). XeLaTeX allows for direct Unicode input and does not need \theta.

• Does it also applies for x of t when I want to writ in in text, like this: $x_{t}$ ? I'm using sharelatex – naman Jun 10 '16 at 13:44
• In general, all mathematical formulae should be typeset using $...$ (or $$...$$) when within a stretch of text or, if they are longer, within an environment such as \begin{equation} ... \end{equation}. For some more info and help, en.wikibooks.org/wiki/LaTeX/Mathematics might be helpful – dariok Jun 10 '16 at 13:53
• Thnaks. But it does not work for equation for me when I try this: \begin{equation} $\overline{bel}(x_{t}) = p ( x_{t} \textbar z_{1:t-1} , u_{1:t} )$ \end{equation} If I remove $..$ then I get worming: Command \textbar invalid in math mode on input line 12 – naman Jun 10 '16 at 13:59
• @naman Within the equation environment you don't need $since \begin{equation} switch on the math mode. The warning you get only means that the \textbar command is not for use in math mode. – DRi Jun 10 '16 at 14:40 You need math mode:$(x,y,\theta)\$.