# How can I center a line of text?

How can I put the following on it's own, centered line:
$\bar{f}(a) = f(a)$ for all $a \in A$
because right now it's left aligned?

Use double $$signs rather than single  signs to center a line of TeX.$$\bar{f}(a) = f(a) \ \forall a \in A\text{or}\bar{f}(a) = f(a) \text{ for all } a \in A\mbox{or}\mbox{$\bar{f}(a) = f(a)$ for all $a \in A$}$$$$\bar{f}(a) = f(a) \  \forall a \in A\text{or}\bar{f}(a) = f(a) \text{ for all } a \in A\mbox{or}\mbox{$\bar{f}(a) = f(a)$ for all $a \in A$}$$ • but what if I want it to have a mix of math and text, as in my example? – Andriy Drozdyuk Nov 13 '12 at 6:18 • You can use \text{insert text here} within TeX lines. Note that your "for all" is a common math symbol and its LaTeX code is \forall. – Joe Nov 13 '12 at 6:25 • If you wish to use multi lines in a single $$ environment you can use \\  as a linebreak. – Asaf Karagila Nov 13 '12 at 11:58