# Parenthesis destroy line formatting

I have just started using Latex. Here is the Latex code:

\rightarrow (a, b). The virtual


and here is the outcome. What is causing this problem and how do I fix it?

-
The problem is not caused by the parentheses. The \rightarrow command needs math mode. You should get a corresponding error message in the log file. Just type $\rightarrow$. –  Thorsten Donig Jul 4 '12 at 9:43
Meta question for Thorsten --- why did you make a comment instead of an answer? It answers the question. –  Rehj Cantrell Jul 4 '12 at 10:09
@RehjCantrell: With such few information in a question I tend to write my first guess in a comment. But I have converted my comment into answer. –  Thorsten Donig Jul 4 '12 at 14:48
is it possible that you got an error message about a missing $ sign, and bypassed it? that is a sure indication of what has happened. – barbara beeton Jul 4 '12 at 17:13 add comment ## 2 Answers The parentheses are not the problem. The \rightarrow command needs math mode and so the compiler activates this mode on its own, but does not end it. That's why the following text is completely typeset in math mode (in italics and without any spaces). You should get the error message »Missing $ inserted.« in the corresponding log file. Just introduce math mode in your source and the problem will vanish.

$\to (a,b)$. The virtual \ldots

-
From the image file you've posted, it looks like you forgot to insert an end-of-math-mode $ sign after (a,b). The reason I'm venturing this guess is that (a,b) appears to be typeset in math italics and obeys math spacing rules. (While in math mode, TeX ignores spaces, hence there's no space between the period and the T and no space between The and virtual. As @ThorstenDonig suggests, an inspection of the log file should reveal this error.) The problem is easily fixed by supplying the missing $ symbol:
 $... \rightarrow (a,b)$. The virtual

@ThorstenDonig: you're right -- it's not possible to be sure whether the OP forgot to provide "just" the closing $ inline math mode delimiter or both the opening and closing $ delimiters. Anyway, I'd also recommend inserting the closing delimiter after (a,b) since it would appear to be part of the math "formula" in question. –  Mico Jul 4 '12 at 15:14