summaryrefslogtreecommitdiffstats
path: root/Documentation/conf.py
diff options
context:
space:
mode:
authorAkira Yokosawa <akiyks@gmail.com>2022-02-01 09:05:40 +0900
committerJonathan Corbet <corbet@lwn.net>2022-02-15 16:35:54 -0700
commitb774cc46313b3d7c9139f29df67818a8b858c558 (patch)
tree96ede0b9d09222516d48dbcd874c65c048cbbaf9 /Documentation/conf.py
parent5d9158e3c762f0bf1753501d8e64eb6fe19dc437 (diff)
downloadlinux-b774cc46313b3d7c9139f29df67818a8b858c558.tar.gz
linux-b774cc46313b3d7c9139f29df67818a8b858c558.tar.bz2
linux-b774cc46313b3d7c9139f29df67818a8b858c558.zip
docs: pdfdocs: Move CJK monospace font setting to main conf.py
As LaTeX macros for CJK font settings can have Latin-script font settings as well, settings under Documentation/translations/ can be moved to the main conf.py. By this change, translations.pdf built by top-level "make pdfdocs" can have properly aligned ascii-art diagrams except for Korean ones. For the reason of remaining misalignment in Korean diagrams, see changelog of commit a90dad8f610a ("docs: pdfdocs: Add conf.py local to translations for ascii-art alignment"). Signed-off-by: Akira Yokosawa <akiyks@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/eb87790a-03f4-9f29-c8a3-ef2c3e78ca18@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r--Documentation/conf.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 62cd0e472b3b..fb8f69fc4d38 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -521,6 +521,8 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKsfdefault}{SCsans}%
\\renewcommand{\\CJKttdefault}{SCmono}%
\\xeCJKsetup{CJKspace = false}%
+ % For CJK ascii-art alignment
+ \\setmonofont{Noto Sans Mono CJK SC}[AutoFakeSlant]%
}
\\newcommand{\\kerneldocEndSC}{\\endgroup}
\\newcommand{\\kerneldocBeginTC}{%
@@ -532,6 +534,8 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKsfdefault}{TCsans}%
\\renewcommand{\\CJKttdefault}{TCmono}%
\\xeCJKsetup{CJKspace = false}%
+ % For CJK ascii-art alignment
+ \\setmonofont{Noto Sans Mono CJK TC}[AutoFakeSlant]%
}
\\newcommand{\\kerneldocEndTC}{\\endgroup}
\\newcommand{\\kerneldocBeginKR}{%
@@ -541,6 +545,8 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKsfdefault}{KRsans}%
\\renewcommand{\\CJKttdefault}{KRmono}%
% \\xeCJKsetup{CJKspace = true} % true by default
+ % For CJK ascii-art alignment (still misaligned for Hangul)
+ \\setmonofont{Noto Sans Mono CJK KR}[AutoFakeSlant]%
}
\\newcommand{\\kerneldocEndKR}{\\endgroup}
\\newcommand{\\kerneldocBeginJP}{%
@@ -550,6 +556,8 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKsfdefault}{JPsans}%
\\renewcommand{\\CJKttdefault}{JPmono}%
\\xeCJKsetup{CJKspace = false}%
+ % For CJK ascii-art alignment
+ \\setmonofont{Noto Sans Mono CJK JP}[AutoFakeSlant]%
}
\\newcommand{\\kerneldocEndJP}{\\endgroup}
% Single spacing in literal blocks