Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

enter image description here

share|improve this question
4  
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
1  
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 2

up vote 6 down vote accepted

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
share|improve this answer
add comment

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
share|improve this answer
2  
Mathematical symbols make the compiler activate math mode on its own. So its not for sure that @Bruce has not only forgotten to end math mode. It seems he has dropped math mode completely. –  Thorsten Donig Jul 4 '12 at 14:51
1  
@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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.