[Tex/LaTex] How does one display straight quotes in the normal font

punctuationsymbolsxetex

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:

LaTeX Output

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.

Best Answer

You can use \textquotedbl with

\usepackage[T1]{fontenc}% http://ctan.org/pkg/fontenc

Here is a display of the output:

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}% http://ctan.org/pkg/fontenc
\begin{document}
\setcounter{section}{3}\setcounter{subsection}{1}% Just for this example
\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, \textquotedbl, the ending delimiter is also a quote
mark \textquotedbl, and the escape character is the backslash \textbackslash.
\end{document}