[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Avoid apostrophe being output as non-ASCII quote in Info output
From: |
Gavin Smith |
Subject: |
Avoid apostrophe being output as non-ASCII quote in Info output |
Date: |
Wed, 22 Feb 2023 18:44:03 +0000 |
Link to previous discussion:
> https://lists.gnu.org/archive/html/automake-patches/2022-12/msg00000.html
> https://lists.gnu.org/archive/html/bug-texinfo/2022-12/msg00076.html
The summary is that words with apostrophes, like "don't", should be
output in Info with an ASCII apostrophe so it is easy to search for these
words.
Unfortunately, I cannot think of an unobtrusive way of implementing this
other than by adding new customization variable(s).
OPEN_QUOTE_SYMBOL and CLOSE_QUOTE_SYMBOL should still affect commands such
as @samp, and should remain set to the Unicode curly quotes by default for
the benefit of highlighting in Emacs Info.
ASCII_PUNCTUATION affects the output of other symbols such as
@bullet{} and @result{} (everything listed in %extra_unicode_map in
Texinfo/Convert/Unicode.pm), so setting ASCII_PUNCTUATION to true by
default may not be good for some users who are used to these non-ASCII
renderings in Info.
I suggest splitting the function of ASCII_PUNCTUATION so that following
two things can be configured separately:
* Use of non-ASCII characters for some glyph commands (in
Texinfo/Convert/Text.pm, in 'brace_no_arg_command')
* Text processing (in Texinfo/Convert/Plaintext.pm, in _process_text) to
convert ``, '', --- and -- ligatures.
The latter would probably be an improvement for --- and -- too, as
the two types of dash may appear indistinguishable in a fixed width font:
a — b – c
Adding a new configuration variable to configure the second point
would be simple to do.
It would have been better if -c ASCII_PUNCTUATION=1 avoided any of the
non-ASCII output that was output before; however, with a new variable
for the second point, the name of ASCII_PUNCTUATION would become more
misleading as most of what it affected wouldn't be punctuation.
Hence, what I propose is adding a new variable (ASCII_GLYPH or similar)
for the first point, set to false by default. ASCII_PUNCTUATION would
only affect the second point, and be set to true by default.
There is a third function of ASCII_PUNCTUATION:
* output for @samp etc. (in Texinfo/Convert/Plaintext.pm)
This can be configured with OPEN_QUOTE_SYMBOL and CLOSE_QUOTE_SYMBOL.
Unfortunately again, Unicode curly quotes would reappear for the
output of these for anybody currently using '-c ASCII_PUNCTUATION=1'.
(Since this variable was only introduced in Texinfo 7.0, it's possible
it doesn't have many users anyway.)
Double quotes are unaffected by this disucssion although Patrice recently
added OPEN_DOUBLE_QUOTE_SYMBOL and CLOSE_DOUBLE_QUOTE_SYMBOL symbols.
- Avoid apostrophe being output as non-ASCII quote in Info output,
Gavin Smith <=