lkml.org 
[lkml]   [2021]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC PATCH v2 3/7] docs: pdfdocs: Use one-half spacing in CJK translations
From
Date
CJK documents are much easier to read with a wider baseline stretch.
Applying onehalfspacing option of the "setspace" package gives a
reasonable result.

The wider baseline is effective between \kerneldocCJKon and
\kerneldocCJKoff.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
Documentation/conf.py | 7 +++++--
Documentation/translations/ja_JP/howto.rst | 8 ++++++++
Documentation/translations/ko_KR/howto.rst | 8 ++++++++
3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index a61628339d55..23d647881f6e 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -374,8 +374,9 @@ latex_elements['preamble'] += '''
\\newCJKfontfamily[JPsans]\\jpsans{Noto Sans CJK JP}
\\newCJKfontfamily[JPmono]\\jpmono{Noto Sans Mono CJK JP}
% Define custom macros to on/off CJK
- \\newcommand{\\kerneldocCJKon}{\\makexeCJKactive}
- \\newcommand{\\kerneldocCJKoff}{\\makexeCJKinactive}
+ \\usepackage{setspace}
+ \\newcommand{\\kerneldocCJKon}{\\makexeCJKactive\\onehalfspacing}
+ \\newcommand{\\kerneldocCJKoff}{\\makexeCJKinactive\\singlespacing}
\\newcommand{\\kerneldocBeginSC}{%
\\begingroup%
\\scserif%
@@ -398,6 +399,8 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKttdefault}{JPmono}%
}
\\newcommand{\\kerneldocEndJP}{\\endgroup}
+ % Single spacing in literal blocks
+ \\fvset{baselinestretch=1}
% To customize \\sphinxtableofcontents
\\usepackage{etoolbox}
% Inactivate CJK after tableofcontents
diff --git a/Documentation/translations/ja_JP/howto.rst b/Documentation/translations/ja_JP/howto.rst
index 73ebdab4ced7..d667f9d8a02a 100644
--- a/Documentation/translations/ja_JP/howto.rst
+++ b/Documentation/translations/ja_JP/howto.rst
@@ -1,3 +1,7 @@
+.. raw:: latex
+
+ \kerneldocCJKoff
+
NOTE:
This is a version of Documentation/process/howto.rst translated into Japanese.
This document is maintained by Tsugikazu Shibata <tshibata@ab.jp.nec.com>
@@ -11,6 +15,10 @@ try to update the original English file first.

----------------------------------

+.. raw:: latex
+
+ \kerneldocCJKon
+
この文書は、
Documentation/process/howto.rst
の和訳です。
diff --git a/Documentation/translations/ko_KR/howto.rst b/Documentation/translations/ko_KR/howto.rst
index a2bdd564c907..e3cdf0c84892 100644
--- a/Documentation/translations/ko_KR/howto.rst
+++ b/Documentation/translations/ko_KR/howto.rst
@@ -1,3 +1,7 @@
+.. raw:: latex
+
+ \kerneldocCJKoff
+
NOTE:
This is a version of Documentation/process/howto.rst translated into korean
This document is maintained by Minchan Kim <minchan@kernel.org>
@@ -11,6 +15,10 @@ try to update the original English file first.

----------------------------------

+.. raw:: latex
+
+ \kerneldocCJKon
+
이 문서는
Documentation/process/howto.rst
의 한글 번역입니다.
--
2.17.1


\
 
 \ /
  Last update: 2021-07-19 13:14    [W:0.090 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site