docs: kerneldoc-preamble.sty: Suppress extra spaces in CJK literal blocks
Subsystems (2)
PATCH 1/1 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.
---
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(+)
Documentation/sphinx/kerneldoc-preamble.sty +2 -0
@@ -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
Signature · 1 line
2.34.1
Quoted 7 lines · Akira Yokosawa
In
zh_CNpart 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).
Quoted 7 lines
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 <[email protected]>
I've applied this, thanks.
jon
Quoted 2 lines · Akira Yokosawa
Note for Jon:
Current docs-next won't complete full "make htmldocs".
Oh well...
I made a typo here, I wanted to say "make pdfdocs"
Jon, looks like it affected the change log of the back merge.
Is it too late to amend it?
Thanks, Akira
Jonathan Corbet
maintainerQuoted 10 lines · Akira Yokosawa
Quoted 2 lines · Akira Yokosawa
Note for Jon:
Current docs-next won't complete full "make htmldocs".Oh well...
I made a typo here, I wanted to say "make pdfdocs"Jon, looks like it affected the change log of the back merge.
Is it too late to amend it?
I'd have to rebase the tree, which I prefer to avoid when I can. And it *did* create troubles for the htmldocs build too...:)
Thanks,
jon
On Fri, 06 Sep 2024 12:58:13 -0600, Jonathan Corbet wrote:
[...]
Quoted 2 lines
I'd have to rebase the tree, which I prefer to avoid when I can. And it *did* create troubles for the htmldocs build too...:)
Aha, this one (as of commit eb5ed2fae197)!
<...>/Documentation/ABI/testing/sysfs-bus-i2c-devices-turris-omnia-mcu:26: ERROR: Unexpected indentation.
To be clear, I didn't anticipate a backport just for the sake of fixing pdfdocs build. Lucky for me v6.11-rc6 has the fix to it, too.
Thanks, Akira