]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
docs: kerneldoc-preamble: Test xeCJK.sty before loading
authorAkira Yokosawa <akiyks@gmail.com>
Mon, 8 Aug 2022 08:53:57 +0000 (17:53 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:31:26 +0000 (10:31 +0200)
commita8ba16e9f171e9638401ff39daebdd2b84553e2d
tree95e8efdc5e7e7a476ee0102ac13d03a6840af53a
parente120a63532946bad71dc6255579a3219a9caf66c
docs: kerneldoc-preamble: Test xeCJK.sty before loading

commit cee7db1b0239468b22c295cf04a8c40c34ecd35a upstream.

On distros whose texlive packaging is fine-grained, texlive-xecjk
can be installed/removed independently of other texlive packages.
Conditionally loading xeCJK depending only on the existence of the
"Noto Sans CJK SC" font might end up in xelatex error of
"xeCJK.sty not found!".

Improve the situation by testing existence of xeCJK.sty before
loading it.

This is useful on RHEL 9 and its clone distros where texlive-xecjk
doesn't work at the moment due to a missing dependency [1].
"make pdfdocs" for non-CJK contents should work after removing
texlive-xecjk.

Link: [1] https://bugzilla.redhat.com/show_bug.cgi?id=2086254
Fixes: 398f7abdcb7e ("docs: pdfdocs: Pull LaTeX preamble part out of conf.py")
Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/c24c2a87-70b2-5342-bcc9-de467940466e@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/sphinx/kerneldoc-preamble.sty