Next: , Previous: , Up: Insertions   [Contents][Index]


12.2 Inserting Quote Characters

As explained in the early section on general Texinfo input conventions (see 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.

This works all right for text. However, in examples of computer code, readers are especially likely to cut and paste the text verbatim—and, unfortunately, some document viewers will mangle these characters. (The free PDF reader xpdf works fine, but other PDF readers, both free and nonfree, have problems.)

If this is a concern for you, Texinfo provides these two commands:

@codequoteundirected on-off

causes the output for the ' character in code environments to be the undirected single quote, like this: '.

@codequotebacktick on-off

causes the output for the ` character in code environments to be the backtick character (standalone grave accent), like this: `.

If you want these settings for only part of the document, @codequote... off will restore the normal behavior, as in @codequoteundirected off.

These settings affect @code, @example, @kbd, @samp, @verb, and @verbatim. See Useful Highlighting.

This feature used to be controlled by using @set to change the values of the corresponding variables txicodequoteundirected and txicodequotebacktick; they are still supported, but the command interface is preferred.


Next: , Previous: , Up: Insertions   [Contents][Index]