# Use of " in verbatim mode

I would like to use the symbol " inside \verb. Is that possible? For example, in

\verb"abc"defg"


the second " will be interpreted as the end of the verbatim environment though my intention is that the whole string abc"defg is in verbatim.

You could use different delimiters for the verb command, such as !

% arara: pdflatex
\documentclass{article}

\begin{document}

\verb!abc"defg!
\end{document}


As detailed in Why can't curly braces be used as a delimiter for \verb? i.e. \verb{foo} you can use any character you like for the delimiter, provided that it isn't *. So, for example, any of the following will work

• \verb&abc"defg&

• \verb3abc"defg3

• \verb^abc"defg^

Of course, the sense in using such delimiters may be questionable.