texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Sun, 8 Jan 2023 10:14:18 -0500 (EST)

branch: master
commit 465b43edf9abc5de455e8eebaaa296b8d8d3afef
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Jan 8 15:14:08 2023 +0000

    @set txicodequoteundirected and @set txicodequotebacktick by default
    
    * doc/texinfo.tex: Turn on "@set txicodequoteundirected" and
    "@set txicodequotebacktick" by default.
    (\codequoteleft, \codequoteright): Access glyphs by hexadecimal
    index rather octal so to match comment.
    * doc/texinfo.tex (Inserting Quote Characters): Update.  Make
    text appropriate for all output formats by limiting sample output.
    * NEWS: Mention.
---
 ChangeLog        | 12 ++++++++++++
 NEWS             |  5 ++++-
 doc/texinfo.tex  | 29 +++++++++++++++--------------
 doc/texinfo.texi | 49 +++++++++++++++++++++++++++----------------------
 4 files changed, 58 insertions(+), 37 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a7d6e8e531..b812dfe8cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2023-01-08  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       @set txicodequoteundirected and @set txicodequotebacktick by default
+
+       * doc/texinfo.tex: Turn on "@set txicodequoteundirected" and
+       "@set txicodequotebacktick" by default.
+       (\codequoteleft, \codequoteright): Access glyphs by hexadecimal
+       index rather octal so to match comment.
+       * doc/texinfo.tex (Inserting Quote Characters): Update.  Make
+       text appropriate for all output formats by limiting sample output.
+       * NEWS: Mention.
+
 2023-01-08  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * doc/texinfo.tex (\indexnofonts): Remove obsolete comment
diff --git a/NEWS b/NEWS
index 0a061b4247..ec350b13fd 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ See the manual for detailed information.
 ------------------------------------------------------------------------------
 
 * Language
-  . @cartouche takes an argument to specify the cartouche title
+ . @cartouche takes an argument to specify the cartouche title
 
 * texi2any
  . @itemx at the beginning of a @table is now an error, not a warning
@@ -32,6 +32,9 @@ See the manual for detailed information.
    happens with --expand option or with very old texinfo.tex)
 
 * texinfo.tex
+ . in @code, ` and ' output by default with backtick and undirected
+   single quote glyphs in the typewriter font.  you can still configure
+   this using the @codequoteundirected/@codequotebacktick commands.
  . page headings generation is no longer linked to the @titlepage command
  . microtype is off by default, for speed
 
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index bd4ceee181..a0e6c2664f 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2023-01-08.13}
+\def\texinfoversion{2023-01-08.15}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -2683,25 +2683,21 @@ end
 }
 \setregularquotes
 
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report.  xpdf does work with the regular 0x27.
+% output for ' in @code
+% in tt font hex 0D (undirected) or 27 (curly right quote)
 %
 \def\codequoteright{%
   \ifusingtt
       {\ifflagclear{txicodequoteundirected}%
           {\ifflagclear{codequoteundirected}%
               {'}%
-              {\char'15 }}%
-          {\char'15 }}%
+              {\char"0D }}%
+          {\char"0D }}%
       {'}%
 }
 
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
+% output for ` in @code
+% in tt font hex 12 (grave accent) or 60 (curly left quote)
 % \relax disables Spanish ligatures ?` and !` of \tt font.
 %
 \def\codequoteleft{%
@@ -2709,8 +2705,8 @@ end
       {\ifflagclear{txicodequotebacktick}%
           {\ifflagclear{codequotebacktick}%
               {\relax`}%
-              {\char'22 }}%
-          {\char'22 }}%
+              {\char"12 }}%
+          {\char"12 }}%
       {\relax`}%
 }
 
@@ -2729,7 +2725,7 @@ end
     \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
   \fi\fi
 }
-%
+
 \parseargdef\codequotebacktick{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -2744,6 +2740,11 @@ end
   \fi\fi
 }
 
+% Turn them on by default
+\let\SETtxicodequoteundirected = t
+\let\SETtxicodequotebacktick = t
+
+
 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 \def\noligaturesquoteleft{\relax\lq}
 
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 977184ae7a..3ef7744f45 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -9379,48 +9379,53 @@ As explained in the early section on general Texinfo 
input conventions
 characters (@code{``} and @code{''}) 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 @command{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:
+In examples of computer code, however, @code{`} and @code{'} produce
+typical renderings for these ASCII characters: the backtick character
+(standalone grave accent) and undirected single quote respectively.
+In the past, directed glyphs
+@iftex
+@clear txicodequoteundirected
+@clear txicodequotebacktick
+(@code{`} and @code{'})
+@set txicodequoteundirected
+@set txicodequotebacktick
+@end iftex
+were used by default in @TeX{} output.  Texinfo provides these commands
+to choose between these alternate renderings:
 
 @table @code
 @findex codequoteundirected
 @cindex undirected single quote
 @item @@codequoteundirected @var{on-off}
-causes the output for the @code{'} character in code environments to
-be the undirected single quote, like this:
-@set txicodequoteundirected on
-@code{'}.
-@set txicodequoteundirected off
+Set to @samp{off} to output the @code{'} character in code environments
+as the right curly single quote.
 
 @findex codequotebacktick
 @cindex Backtick
 @cindex Grave accent @subentry standalone
 @item @@codequotebacktick @var{on-off}
-causes the output for the @code{`} character in code environments to
-be the backtick character (standalone grave accent), like this:
-@set txicodequotebacktick on
-@code{`}.
-@set txicodequotebacktick off
+Set to @samp{off} to output the @code{`} character in code environments
+as the left curly single quote.
 @end table
 
 If you want these settings for only part of the document,
-@code{@@codequote... off} will restore the normal behavior, as in
-@code{@@codequoteundirected off}.
+@code{@@codequote... on} will restore the normal behavior, as in
+@code{@@codequoteundirected on}.
 
 These settings affect @code{@@code}, @code{@@example}, @code{@@kbd},
 @code{@@samp}, @code{@@verb}, and @code{@@verbatim}.  @xref{Useful
 Highlighting}.
 
+Unfortunately, some document viewers will mangle the directed
+quote characters when copying and pasting.  (The free PDF reader
+@command{xpdf} works fine, but other PDF readers, both free and
+nonfree, have problems.)
+
 @vindex txicodequoteundirected
 @vindex txicodequotebacktick
-This feature can also be controlled by using @code{@@set} to change the
-values of the corresponding variables @code{txicodequoteundirected}
-and @code{txicodequotebacktick}.
+This feature can also be controlled by using @code{@@set}
+and @code{@@clear} on the corresponding variables
+@code{txicodequoteundirected} and @code{txicodequotebacktick}.
 
 
 @node Inserting Space



reply via email to

[Prev in Thread] Current Thread [Next in Thread]