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

is there a way to type the "@" sign in lstlisting? I have tried just putting @ or \@ but both don't seem to work:




it just outputs

share|improve this question

closed as too localized by Marco Daniel, egreg, Alan Munn, Mico, Werner Apr 25 '13 at 18:50

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Marco Daniel Apr 25 '13 at 18:15
If you add an MWE, we can reopen this question as it will be useful to other users of the site. – Charles Stewart Apr 26 '13 at 6:58
See also tex.stackexchange.com/questions/12768/… - this is close to a duplicate, although if you don't know what is going on, the difference in the character that manifests the problem will make them look different. – Charles Stewart Apr 26 '13 at 7:08

The problem was that I had a escapeinside={@}{@} in my \lstset settings, so the @ symbol did not behave as I expected. This can be solved by changing that command so that other delimiters are used.

share|improve this answer
It'd be ideal if you could still post an MWE demonstrating the problem, so that others may fall upon this post and find the fix for themselves. :) – Sean Allred Apr 25 '13 at 18:41

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