From: Jonathan Corbet <corbet@lwn.net>
To: Akira Yokosawa <akiyks@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
"Wu X.C." <bobwxc@email.cn>, Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH v4] docs: Activate exCJK only in CJK chapters
Date: Thu, 27 May 2021 10:00:09 -0600 [thread overview]
Message-ID: <878s40416e.fsf@meer.lwn.net> (raw)
In-Reply-To: <83208ddc-5de9-b283-3fd6-92c635348ca0@gmail.com>
Akira Yokosawa <akiyks@gmail.com> writes:
> 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
I've applied this, thanks.
jon
prev parent reply other threads:[~2021-05-27 16:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-22 7:28 [PATCH] docs: Activate xeCJK only in CJK chapters Akira Yokosawa
2021-05-22 16:56 ` Wu X.C.
2021-05-22 23:35 ` Akira Yokosawa
2021-05-22 18:14 ` Mauro Carvalho Chehab
2021-05-22 23:21 ` Akira Yokosawa
2021-05-25 11:17 ` [PATCH v2] docs: Activate exCJK " Akira Yokosawa
2021-05-25 12:30 ` Wu X.C.
2021-05-25 12:55 ` Akira Yokosawa
2021-05-25 13:39 ` Mauro Carvalho Chehab
2021-05-25 13:38 ` [PATCH v3] " Akira Yokosawa
2021-05-25 15:25 ` [PATCH v4] " Akira Yokosawa
2021-05-27 16:00 ` Jonathan Corbet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878s40416e.fsf@meer.lwn.net \
--to=corbet@lwn.net \
--cc=akiyks@gmail.com \
--cc=bobwxc@email.cn \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.