Commit 29ac9822 authored by Akira Yokosawa's avatar Akira Yokosawa Committed by Jonathan Corbet

docs: pdfdocs: Teach xeCJK about character classes of quotation marks

Quotation marks in "KR" and "JP" variants of Noto CJK fonts are half
width.
xeCJK assumes they are full width by default and does excessive kerning
around them in Korean and Japanese translations.

Give xeCJK proper hints by the \xeCJKDeclareCharClass command.
Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
Link: https://lore.kernel.org/r/0da9e3c5-2716-f576-1df5-2f28ea69f0e8@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 788d28a2
...@@ -428,6 +428,8 @@ latex_elements['preamble'] += ''' ...@@ -428,6 +428,8 @@ latex_elements['preamble'] += '''
\\newcommand{\\kerneldocEndTC}{\\endgroup} \\newcommand{\\kerneldocEndTC}{\\endgroup}
\\newcommand{\\kerneldocBeginKR}{% \\newcommand{\\kerneldocBeginKR}{%
\\begingroup% \\begingroup%
\\xeCJKDeclareCharClass{HalfLeft}{`“,`‘}%
\\xeCJKDeclareCharClass{HalfRight}{`”,`’}%
\\krmain% \\krmain%
\\renewcommand{\\CJKrmdefault}{KRserif}% \\renewcommand{\\CJKrmdefault}{KRserif}%
\\renewcommand{\\CJKsfdefault}{KRsans}% \\renewcommand{\\CJKsfdefault}{KRsans}%
...@@ -437,6 +439,8 @@ latex_elements['preamble'] += ''' ...@@ -437,6 +439,8 @@ latex_elements['preamble'] += '''
\\newcommand{\\kerneldocEndKR}{\\endgroup} \\newcommand{\\kerneldocEndKR}{\\endgroup}
\\newcommand{\\kerneldocBeginJP}{% \\newcommand{\\kerneldocBeginJP}{%
\\begingroup% \\begingroup%
\\xeCJKDeclareCharClass{HalfLeft}{`“,`‘}%
\\xeCJKDeclareCharClass{HalfRight}{`”,`’}%
\\jpmain% \\jpmain%
\\renewcommand{\\CJKrmdefault}{JPserif}% \\renewcommand{\\CJKrmdefault}{JPserif}%
\\renewcommand{\\CJKsfdefault}{JPsans}% \\renewcommand{\\CJKsfdefault}{JPsans}%
......
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