[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Non-standard single quotes in book
From: |
Assaf Gordon |
Subject: |
Re: Non-standard single quotes in book |
Date: |
Sun, 15 Dec 2019 00:45:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
Hello,
On 2019-12-14 6:43 p.m., address@hidden wrote:
This is a bug report on the book
[...]
To Arnold Robbins:
Throughout the book the supposed single quotes are not real single quotes: ’ vs
'
As a result, all of the examples in the book fail to work when cut and pasted
to the Linux command line or to a program. The reader is tortured by having to
replace these garbage characters with real single quotes before the examples
will run.
In GNU sed we solved the same issue using texinfo's @codequoteundirected
and @codequotebacktick commands:
e.g.:
@codequoteundirected on
@codequotebacktick on
@example
$ echo hello world | sed 'y/abcdefghij/0123456789/'
74llo worl3
@end example
@codequoteundirected off
@codequotebacktick off
mentioned here:
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Inserting-Quote-Characters.html
Please note that these commands were introduced in texinfo 5.0.
If one wants to support older versions (e.g. 4.13 which is widely
available on BSDs and older systems), a small hack is required.
See lines 11 to 35 in sed's "config.texi":
https://git.savannah.gnu.org/cgit/sed.git/tree/doc/config.texi
Hope this helps,
- assaf