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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
The issue can be seen in, e.g., an ASCII-art diagram in section
"ACRN 超级管理器介绍" in the zh_CN translation.

Note for Jon:
  Current docs-next won't complete full "make htmldocs".
  If you'd like to see the effect of this change, please use
  "SPHINXDIRS=translations" option.

  Fix to the build issue was merged as of v6.11-rc2 as:
  commit 914f8961879d ("media: v4l: Fix missing tabular column hint
  for Y14P format").

        Thanks, Akira
---
 Documentation/sphinx/kerneldoc-preamble.sty | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/sphinx/kerneldoc-preamble.sty b/Documentation/sphinx/kerneldoc-preamble.sty
index d479cfa73658..5d68395539fe 100644
--- a/Documentation/sphinx/kerneldoc-preamble.sty
+++ b/Documentation/sphinx/kerneldoc-preamble.sty
@@ -199,6 +199,8 @@
     % Inactivate CJK after tableofcontents
     \apptocmd{\sphinxtableofcontents}{\kerneldocCJKoff}{}{}
     \xeCJKsetup{CJKspace = true}% For inter-phrase space of Korean TOC
+    % Suppress extra white space at latin .. non-latin in literal blocks
+    \AtBeginEnvironment{sphinxVerbatim}{\CJKsetecglue{}}
 }{ % Don't enable CJK
     % Custom macros to on/off CJK and switch CJK fonts (Dummy)
     \newcommand{\kerneldocCJKon}{}

base-commit: f92a24ae7c953263600fc7ea3f0594676ea82138
-- 
2.34.1





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux