在 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 <bob...@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!