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


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.

1 Answer 1


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

% arara: pdflatex



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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .