As explained in the early section on general Texinfo input conventions
(see General Syntactic Conventions), Texinfo source files use the ASCII character
`
(96 decimal) to produce a left quote (‘), and ASCII '
(39 decimal) to produce a right quote (’). Doubling these input
characters (``
and ''
) produces double quotes (“ and
”). These are the conventions used by TeX.
In examples of computer code, however, `
and '
produce
typical renderings for these ASCII characters: the backtick character
(standalone grave accent) and undirected single quote respectively.
In the past, directed glyphs
were used by default in TeX output. Texinfo provides these commands
to choose between these alternate renderings:
@codequoteundirected on-off
¶Set to ‘off’ to output the '
character in code environments
as the right curly single quote.
@codequotebacktick on-off
Set to ‘off’ to output the `
character in code environments
as the left curly single quote.
If you want these settings for only part of the document,
@codequote... on
will restore the normal behavior, as in
@codequoteundirected on
.
These settings affect @code
, @example
, @kbd
,
@samp
, @verb
, and @verbatim
. See Highlighting Commands are Useful.
Unfortunately, some document viewers will mangle the directed
quote characters when copying and pasting. (The free PDF reader
xpdf
works fine, but other PDF readers, both free and
nonfree, have problems.)
This feature can also be controlled by using @set
and @clear
on the corresponding variables
txicodequoteundirected
and txicodequotebacktick
.