# Double quote and less characters (">) create a problem with listings [closed]

I don't know how to fix this problem, when I use "> in a listings I see a weird double > as result.

See this example, where the following section of my article:

De esta forma si el título ingresado por el astrónomo es \textit{Stars survey}, el resultado en el \textit{resource descriptor} será \code{<resource schema="stars\_survey">}.


Get the following result:

And when I use simple quotes there's no problem:

So, how can I fix the problem? I want to be able to write a "> in the listings!

BTW, I declared my code command like this:

\newcommand\code[1]{
\tikz[baseline=(s.base)]{
\node(s)[fill=gray!20,draw=gray]{\texttt{#1}};
}
}


## closed as off-topic by siracusa, Raaja, Henri Menke, Sebastiano, TeXnicianJul 22 at 8:01

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• "> is a babel shorthand for spanish (goes for », as you found out). You can use \shorthandoff{">} before your listings code and then re-enable it later with \shorthandon{">}. Alternatively you could for "\textgreater. – gusbrs May 8 '18 at 3:56
• You could also look into listings or other packages that really treat their argument verbatim. Then you can write "stars_survey" directly and don't need to escape the _ as in "stars\_survey". Verbatim is tricky, so it is possible that you can't get exactly what you want here. – moewe May 8 '18 at 5:25
• I'm voting to close this question as off-topic because it was solved in the comments – siracusa Jul 22 at 4:05