]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
docs: pdfdocs: Teach xeCJK about character classes of quotation marks
authorAkira Yokosawa <akiyks@gmail.com>
Mon, 9 Aug 2021 01:27:18 +0000 (10:27 +0900)
committerJonathan Corbet <corbet@lwn.net>
Thu, 12 Aug 2021 15:13:33 +0000 (09:13 -0600)
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: Akira Yokosawa <akiyks@gmail.com>
Link: https://lore.kernel.org/r/0da9e3c5-2716-f576-1df5-2f28ea69f0e8@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/conf.py

index afa085c7178183d85c2fcbe848ccbac6e462103e..75650f6443af951ace072d201f93aa4e70319413 100644 (file)
@@ -428,6 +428,8 @@ latex_elements['preamble']  += '''
        \\newcommand{\\kerneldocEndTC}{\\endgroup}
        \\newcommand{\\kerneldocBeginKR}{%
            \\begingroup%
+           \\xeCJKDeclareCharClass{HalfLeft}{`“,`‘}%
+           \\xeCJKDeclareCharClass{HalfRight}{`”,`’}%
            \\krmain%
            \\renewcommand{\\CJKrmdefault}{KRserif}%
            \\renewcommand{\\CJKsfdefault}{KRsans}%
@@ -437,6 +439,8 @@ latex_elements['preamble']  += '''
        \\newcommand{\\kerneldocEndKR}{\\endgroup}
        \\newcommand{\\kerneldocBeginJP}{%
            \\begingroup%
+           \\xeCJKDeclareCharClass{HalfLeft}{`“,`‘}%
+           \\xeCJKDeclareCharClass{HalfRight}{`”,`’}%
            \\jpmain%
            \\renewcommand{\\CJKrmdefault}{JPserif}%
            \\renewcommand{\\CJKsfdefault}{JPsans}%