From this code:
\subsubsection{General Escaping Format}
Generally, escaping MUST be done in a manner similar to most programming
languages, such as C, C++, Java, or similar, for quoted string escapes. Such an
escaping scheme is defined by three characters: a starting delimiter, a
termination delimiter, and an escape character. For instance, in C, the starting
delimiter is the quote mark, ", the ending delimiter is also a quote
mark ", and the escape character is the backslash \textbackslash.
XeTeX gives this:
Note in particular the quotes that I want to be raw C style "
characters, are converted into a pair of right curly quotes. Of course, I'm talking about programming languages in this section, so I need the quotes to be displayed as typewriter style straight quotes. I can force the straight quotes if I use \verb
, but this causes the quotes to look strange because the actual font is different.
\Verbdef\dblq{"}
and then\dblq
(newverbs
package) should do it, but Werners answer is much better anyway.\texttt
or\verb
or\lstinline
or … If you find the output weird, change your typewriter font.