Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: kerneldoc-preamble.sty: Suppress extra spaces in CJK literal blocks

In zh_CN part of translations.pdf, there are several ASCII-art
diagrams whose vertical lines look sometimes jagged.
This is due to the interference between default settings of xeCJK
and fancyvrb (employed in sphinxVerbatim env), where extra space
is inserted between a latin char and a non-latin char when they
are next to each other (i.e., no explicit white space).

This issue can be suppressed by invoking \CJKsetecglue{} at the
beginning of every sphinxVerbatim enviornment.

\AtBeginEnvironment, provided by the etoolbox package, is useful in
this case.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240905050941.31439-1-akiyks@gmail.com

authored by

Akira Yokosawa and committed by
Jonathan Corbet
93292980 d224338a

+2
+2
Documentation/sphinx/kerneldoc-preamble.sty
··· 199 199 % Inactivate CJK after tableofcontents 200 200 \apptocmd{\sphinxtableofcontents}{\kerneldocCJKoff}{}{} 201 201 \xeCJKsetup{CJKspace = true}% For inter-phrase space of Korean TOC 202 + % Suppress extra white space at latin .. non-latin in literal blocks 203 + \AtBeginEnvironment{sphinxVerbatim}{\CJKsetecglue{}} 202 204 }{ % Don't enable CJK 203 205 % Custom macros to on/off CJK and switch CJK fonts (Dummy) 204 206 \newcommand{\kerneldocCJKon}{}