From patchwork Thu Dec 10 18:16:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Eggert X-Patchwork-Id: 9968 Received: (qmail 14735 invoked by alias); 10 Dec 2015 18:17:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 14620 invoked by uid 89); 10 Dec 2015 18:17:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: zimbra.cs.ucla.edu From: Paul Eggert To: libc-alpha@sourceware.org Cc: Paul Eggert Subject: [PROPOSED PATCH] Fix doc quoting problems with Texinfo 5 Date: Thu, 10 Dec 2015 10:16:28 -0800 Message-Id: <1449771388-13394-1-git-send-email-eggert@cs.ucla.edu> MIME-Version: 1.0 Without this change, in the info file output Texinfo 5 quotes code in text with undirected single quotes 'like this' and generates code examples that with many PDF readers cannot be cut out of PDFs and pasted into code. * manual/libc.texinfo: Configure the libc manual like the GNU Emacs manual, by using @documentencoding and setting txicodequoteundirected and txicodequotebacktick. This way, Texinfo 5 quotes code in text with directed single quotes ‘like this’ and produces examples that can be cut out of PDFs. This change causes Texinfo 5 to generate info files that contain UTF-8 characters in the set {'‘', '’', '“', '”', 'Ä', 'ä', 'ö', '−', '–', '—', '©', '⇒', '•', '…'}, which is OK nowadays. --- ChangeLog | 14 ++++++++++++++ manual/libc.texinfo | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 81e5791..6a71f9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2015-12-10 Paul Eggert + Fix doc quoting problems with Texinfo 5 + Without this change, in the info file output Texinfo 5 quotes code + in text with undirected single quotes 'like this' and generates + code examples that with many PDF readers cannot be cut out of PDFs + and pasted into code. + * manual/libc.texinfo: Configure the libc manual like the GNU + Emacs manual, by using @documentencoding and setting + txicodequoteundirected and txicodequotebacktick. This way, + Texinfo 5 quotes code in text with directed single quotes ‘like + this’ and produces examples that can be cut out of PDFs. This + change causes Texinfo 5 to generate info files that contain UTF-8 + characters in the set {'‘', '’', '“', '”', 'Ä', 'ä', 'ö', '−', + '–', '—', '©', '⇒', '•', '…'}, which is OK nowadays. + Split large string section; add truncation advice * manual/examples/strncat.c: Remove. This example was misleading, as the code would have undefined diff --git a/manual/libc.texinfo b/manual/libc.texinfo index 554f8b0..5d8ad07 100644 --- a/manual/libc.texinfo +++ b/manual/libc.texinfo @@ -2,6 +2,13 @@ @comment %**start of header (This is for running Texinfo on a region.) @setfilename libc.info @settitle The GNU C Library +@documentencoding UTF-8 +@c '@codequotebacktick on' and '@codequoteundirected on' require +@c Texinfo 5.0 or later, so use the older equivalent @set variables +@c supported in Texinfo 4.11 and later. +@set txicodequoteundirected +@set txicodequotebacktick + @c setchapternewpage odd @include macros.texi