TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use \usepackage{marvosym} and the command \MVAt whenever I need to write the 'at' symbol (@)

But surprisingly it doesn't work in a listings environment

For example:

' having 1=1--
' or 1 in (select @@version)--
' union all select @@version--
' OR 'unusual' = 'unusual'
' OR 'something' = 'some'+'thing'

Also when it comes to ttfamily\verb I have the same problem:

\begin{ttfamily}\verb|declare @s varchar(8000) select @s = db_name() if (ascii(substring(@s,|\end{ttfamily}

Is there a solution to the problem?

share|improve this question
Is anyone able to give me a hint? – user1990170 Jan 26 '13 at 20:27
up vote 3 down vote accepted

You have to tell listings and \verb to change the @ into \MVAt:




' having 1=1--
' or 1 in (select @@version)--
' union all select @@version--
' OR 'unusual' = 'unusual'
' OR 'something' = 'some'+'thing'

\verb|declare @s varchar(8000)|

There's no need to use \ttfamily around \verb.

enter image description here

share|improve this answer

Your Answer


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.