linux/Documentation/translations/zh_CN
Akira Yokosawa f7ebe6b769 docs: Activate exCJK only in CJK chapters
Activating xeCJK in English and Italian-translation documents
results in sub-optimal typesetting with wide-looking apostrophes
and quotation marks.

The xeCJK package provides macros for enabling and disabling its
effect in the middle of a document, namely \makexeCJKactive and
\makexeCJKinactive.

So the goal of this change is to activate xeCJK in the relevant
chapters in translations.

To do this:

    o Define custom macros in the preamble depending on the
      availability of the "Noto Sans CJK" font so that those
      macros can be used regardless of the use of xeCJK package.

    o Patch \sphinxtableofcontents so that xeCJK is inactivated
      after table of contents.

    o Embed those custom macros in each language's index.rst file
      as a ".. raw:: latex" construct.

Note: A CJK chapter needs \kerneldocCJKon in front of its chapter
heading, while a non-CJK chapter should have \kerneldocCJKoff
below its chapter heading.

This is to make sure the CJK font is available to CJK chapter's
heading and ending page's footer.

Tested against Sphinx versions 2.4.4 and 4.0.2.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Tested-by: Wu XiangCheng <bobwxc@email.cn>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/lkml/2061da0a-6ab1-35f3-99c1-dbc415444f37@gmail.com
Link: https://lore.kernel.org/r/83208ddc-5de9-b283-3fd6-92c635348ca0@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-05-27 09:59:41 -06:00
..
admin-guide docs/zh_CN: sync reporting-issues.rst 2021-04-13 15:07:30 -06:00
arm docs: Update DTB format references 2021-01-28 15:43:15 -07:00
arm64 Documentation: Chinese translation of Documentation/arm64/elf_hwcaps.rst 2020-11-30 10:36:45 -07:00
core-api docs/zh_CN: add core api kobject translation 2021-05-17 12:16:09 -06:00
cpu-freq docs/zh_CN: add cpu-freq index.rst translation 2021-04-08 11:39:33 -06:00
dev-tools docs/zh_CN: add translations in zh_CN/dev-tools/gcov 2021-04-15 14:50:59 -06:00
doc-guide docs/zh_CN: two minor fixes in zh_CN/doc-guide/ 2021-04-15 14:54:29 -06:00
filesystems docs: fix broken cross reference in translations/zh_CN 2020-12-14 13:14:22 -07:00
iio docs: zh_CN: add iio index.rst translation 2021-01-28 15:40:47 -07:00
kernel-hacking docs/zh_CN: Add translations in zh_CN/kernel-hacking/ 2021-03-25 11:45:54 -06:00
maintainer docs/zh_CN: Add translation zh_CN/maintainer/modifying-patches.rst 2021-05-17 11:49:43 -06:00
mips docs/zh_CN: remove cn_index tag in mips 2021-01-21 14:06:00 -07:00
openrisc docs/zh_CN: add openrisc index.rst translation 2021-04-20 16:08:15 -06:00
parisc docs/zh_CN: add parisc registers.rst translation 2021-05-20 14:19:55 -06:00
process docs: Use fallthrough pseudo-keyword 2021-05-20 14:06:52 -06:00
riscv docs/zh_CN: add riscv index.rst translation 2021-03-08 17:16:59 -07:00
sound PATCH Documentation translations:translate sound/hd-audio/controls to chinese 2021-03-08 16:54:05 -07:00
video4linux media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
disclaimer-zh_CN.rst Docs/zh_CN: update Alex Shi new email address 2021-03-31 13:52:25 -06:00
gpio.txt
index.rst docs: Activate exCJK only in CJK chapters 2021-05-27 09:59:41 -06:00
io_ordering.txt
IRQ.txt docs: add IRQ documentation at the core-api book 2020-05-15 12:00:56 -06:00
oops-tracing.txt
sparse.txt