From: Akira Yokosawa <akiyks@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH 3/5] docs: pdfdocs: Enable CJKspace in TOC for Korean titles
Date: Tue, 1 Feb 2022 09:03:16 +0900 [thread overview]
Message-ID: <19141b3e-01d9-1f6d-5020-42fbda784831@gmail.com> (raw)
In-Reply-To: <b5b948b7-8e41-3bd6-1a52-44785c89c965@gmail.com>
Korean (Hangul) titles in Table of Contents of translations.pdf
don't have inter-phrase spaces.
This is because the CJKspace option of xeCJK is disabled by
default.
Restore the spaces by enabling the option at the beginning of every
document and disable it in the \kerneldocBegin{SC|TC|JP} commands.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
---
Documentation/conf.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/conf.py b/Documentation/conf.py
index e70aa5fd969f..ded49b8e9bf6 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -520,6 +520,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{SCserif}%
\\renewcommand{\\CJKsfdefault}{SCsans}%
\\renewcommand{\\CJKttdefault}{SCmono}%
+ \\xeCJKsetup{CJKspace = false}%
}
\\newcommand{\\kerneldocEndSC}{\\endgroup}
\\newcommand{\\kerneldocBeginTC}{%
@@ -530,6 +531,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{TCserif}%
\\renewcommand{\\CJKsfdefault}{TCsans}%
\\renewcommand{\\CJKttdefault}{TCmono}%
+ \\xeCJKsetup{CJKspace = false}%
}
\\newcommand{\\kerneldocEndTC}{\\endgroup}
\\newcommand{\\kerneldocBeginKR}{%
@@ -538,7 +540,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{KRserif}%
\\renewcommand{\\CJKsfdefault}{KRsans}%
\\renewcommand{\\CJKttdefault}{KRmono}%
- \\xeCJKsetup{CJKspace = true} % For inter-phrase space
+ % \\xeCJKsetup{CJKspace = true} % true by default
}
\\newcommand{\\kerneldocEndKR}{\\endgroup}
\\newcommand{\\kerneldocBeginJP}{%
@@ -547,6 +549,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{JPserif}%
\\renewcommand{\\CJKsfdefault}{JPsans}%
\\renewcommand{\\CJKttdefault}{JPmono}%
+ \\xeCJKsetup{CJKspace = false}%
}
\\newcommand{\\kerneldocEndJP}{\\endgroup}
% Single spacing in literal blocks
@@ -555,6 +558,7 @@ latex_elements['preamble'] += '''
\\usepackage{etoolbox}
% Inactivate CJK after tableofcontents
\\apptocmd{\\sphinxtableofcontents}{\\kerneldocCJKoff}{}{}
+ \\xeCJKsetup{CJKspace = true} % For inter-phrase space of Korean TOC
}{ % No CJK font found
% Custom macros to on/off CJK (Dummy)
\\newcommand{\\kerneldocCJKon}{}
--
2.17.1
next prev parent reply other threads:[~2022-02-01 0:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 23:56 [PATCH 0/5] docs: pdfdocs: Improve LaTeX preamble (TOC, CJK fonts) Akira Yokosawa
2022-01-31 23:59 ` [PATCH 1/5] docs: pdfdocs: Tweak width params of TOC Akira Yokosawa
2022-02-01 0:02 ` [PATCH 2/5] docs: pdfdocs: Switch default CJK font to KR variants Akira Yokosawa
2022-02-01 0:03 ` Akira Yokosawa [this message]
2022-02-01 0:04 ` [PATCH 4/5] docs/translations: Skip CJK contents if suitable fonts not found Akira Yokosawa
2022-02-01 0:05 ` [PATCH 5/5] docs: pdfdocs: Move CJK monospace font setting to main conf.py Akira Yokosawa
2022-02-15 23:46 ` [PATCH 0/5] docs: pdfdocs: Improve LaTeX preamble (TOC, CJK fonts) Jonathan Corbet
2022-02-16 13:00 ` Akira Yokosawa
2022-02-17 14:21 ` Akira Yokosawa
2022-02-17 16:34 ` Jonathan Corbet
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=19141b3e-01d9-1f6d-5020-42fbda784831@gmail.com \
--to=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).