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?

  • 2
    – Jake
    Jul 5 '13 at 18:54
  • @Jake Probably there is a duplicate, but the one you've indicated doesn't seem to be the right one. 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 Jul 5 '13 at 19:38