bug-texinfo
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] * doc/txi-zh.tex: add modified \chapmacro, \sectionheadi


From: Wu XiangCheng
Subject: Re: [PATCH 3/4] * doc/txi-zh.tex: add modified \chapmacro, \sectionheading, \xrefX and \Ynumbered to fix Chinese chapter/section dispaly.
Date: Fri, 7 Oct 2022 10:11:39 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0

在 2022/10/7 04:15, Gavin Smith 写道:
On Fri, Oct 07, 2022 at 01:07:13AM +0800, Wu XiangCheng wrote:
---
  ChangeLog      |   5 +
  doc/txi-zh.tex | 478 +++++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 483 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 0052938a44..f166ed85a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-06  Wu XiangCheng  <bobwxc@yeah.net>
+
+       * doc/txi-zh.tex: add modified \chapmacro, \sectionheading,
+       \xrefX and \Ynumbered to fix Chinese chapter/section dispaly.
+
This is a huge amount of code to be adding and most of it appears
to be copied from texinfo.tex.  I would prefer to alter texinfo.tex
if necessary rather than duplicating the code.

Can you explain the purpose behind the change?  Is the only issue
the colon (:) in section headings, or is there something else?

Problems to solve:

In English, we say: Chapter 1
In Chinese, we say:   第    1    章
                      |     |     |
                     No.    1   Chapter
The word order is completely different.
So as section title and reference style:
    Section 1.1 => 1.1 section
    Page 100 => 100 page

Solve:

+      \ifx\txizhpackage\thisisundefined
+        \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
+                                   \noexpand\thischapternum:
+                                   \noexpand\thischaptername}%
+      \else
+        \gdef\noexpand\thischapter{第\ \noexpand\thischapternum
+                                   \noexpand\putwordChapter{}\space
+                                   \noexpand\thischaptername}%
+      \fi

Using \txizhpackage label to determine whether to change the
behavior.Would you like to put such hooks in main file? Or may
another elegant way?

Thanks!




reply via email to

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