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


11.2 Inserting Quote Characters

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.

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 Highlighting Commands are Useful.

This feature can also be controlled by using @set to change the values of the corresponding variables txicodequoteundirected and txicodequotebacktick.


Next: Inserting Space, Previous: Special Characters: Inserting @ {} , \ # &, Up: Special Insertions   [Contents][Index]