Commit 7b686a2e authored by Akira Yokosawa's avatar Akira Yokosawa Committed by Jonathan Corbet

docs: pdfdocs: Enable CJKspace in TOC for Korean titles

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: default avatarAkira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/19141b3e-01d9-1f6d-5020-42fbda784831@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 66939df5
...@@ -520,6 +520,7 @@ latex_elements['preamble'] += ''' ...@@ -520,6 +520,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{SCserif}% \\renewcommand{\\CJKrmdefault}{SCserif}%
\\renewcommand{\\CJKsfdefault}{SCsans}% \\renewcommand{\\CJKsfdefault}{SCsans}%
\\renewcommand{\\CJKttdefault}{SCmono}% \\renewcommand{\\CJKttdefault}{SCmono}%
\\xeCJKsetup{CJKspace = false}%
} }
\\newcommand{\\kerneldocEndSC}{\\endgroup} \\newcommand{\\kerneldocEndSC}{\\endgroup}
\\newcommand{\\kerneldocBeginTC}{% \\newcommand{\\kerneldocBeginTC}{%
...@@ -530,6 +531,7 @@ latex_elements['preamble'] += ''' ...@@ -530,6 +531,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{TCserif}% \\renewcommand{\\CJKrmdefault}{TCserif}%
\\renewcommand{\\CJKsfdefault}{TCsans}% \\renewcommand{\\CJKsfdefault}{TCsans}%
\\renewcommand{\\CJKttdefault}{TCmono}% \\renewcommand{\\CJKttdefault}{TCmono}%
\\xeCJKsetup{CJKspace = false}%
} }
\\newcommand{\\kerneldocEndTC}{\\endgroup} \\newcommand{\\kerneldocEndTC}{\\endgroup}
\\newcommand{\\kerneldocBeginKR}{% \\newcommand{\\kerneldocBeginKR}{%
...@@ -538,7 +540,7 @@ latex_elements['preamble'] += ''' ...@@ -538,7 +540,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{KRserif}% \\renewcommand{\\CJKrmdefault}{KRserif}%
\\renewcommand{\\CJKsfdefault}{KRsans}% \\renewcommand{\\CJKsfdefault}{KRsans}%
\\renewcommand{\\CJKttdefault}{KRmono}% \\renewcommand{\\CJKttdefault}{KRmono}%
\\xeCJKsetup{CJKspace = true} % For inter-phrase space % \\xeCJKsetup{CJKspace = true} % true by default
} }
\\newcommand{\\kerneldocEndKR}{\\endgroup} \\newcommand{\\kerneldocEndKR}{\\endgroup}
\\newcommand{\\kerneldocBeginJP}{% \\newcommand{\\kerneldocBeginJP}{%
...@@ -547,6 +549,7 @@ latex_elements['preamble'] += ''' ...@@ -547,6 +549,7 @@ latex_elements['preamble'] += '''
\\renewcommand{\\CJKrmdefault}{JPserif}% \\renewcommand{\\CJKrmdefault}{JPserif}%
\\renewcommand{\\CJKsfdefault}{JPsans}% \\renewcommand{\\CJKsfdefault}{JPsans}%
\\renewcommand{\\CJKttdefault}{JPmono}% \\renewcommand{\\CJKttdefault}{JPmono}%
\\xeCJKsetup{CJKspace = false}%
} }
\\newcommand{\\kerneldocEndJP}{\\endgroup} \\newcommand{\\kerneldocEndJP}{\\endgroup}
% Single spacing in literal blocks % Single spacing in literal blocks
...@@ -555,6 +558,7 @@ latex_elements['preamble'] += ''' ...@@ -555,6 +558,7 @@ latex_elements['preamble'] += '''
\\usepackage{etoolbox} \\usepackage{etoolbox}
% Inactivate CJK after tableofcontents % Inactivate CJK after tableofcontents
\\apptocmd{\\sphinxtableofcontents}{\\kerneldocCJKoff}{}{} \\apptocmd{\\sphinxtableofcontents}{\\kerneldocCJKoff}{}{}
\\xeCJKsetup{CJKspace = true} % For inter-phrase space of Korean TOC
}{ % No CJK font found }{ % No CJK font found
% Custom macros to on/off CJK (Dummy) % Custom macros to on/off CJK (Dummy)
\\newcommand{\\kerneldocCJKon}{} \\newcommand{\\kerneldocCJKon}{}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment