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.

This question already has an answer here:

I tried \texttt{@(x)x.^2} or directly @(x)x.^2 but texmaker gives Missing $ inserted. I gues it is because x.^2 which is assumed to be math syntax. Can you help?

share|improve this question

marked as duplicate by Jake, Torbjørn T., egreg, barbara beeton, cmhughes Jul 5 '13 at 19:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
\verb|@(x)x.^2| –  Jake Jul 5 '13 at 18:54
    
Works perfect! thank you very much. –  newzad Jul 5 '13 at 18:58
    
@Jake Probably there is a duplicate, but the one you've indicated doesn't seem to be the right one. –  karlkoeller Jul 5 '13 at 19:10
    
@karlkoeller: I think it is the right one, it's concerned with printing special characters, and egreg's answer suggests using \verb. But feel free to suggest a different question, whichever gets used most in the close votes will be displayed as the duplicate. –  Jake Jul 5 '13 at 19:13
    
possible duplicate: When should one use \verb and when \texttt –  barbara beeton Jul 5 '13 at 19:38

Browse other questions tagged or ask your own question.