diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-08-21 10:16:43 +0200 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2025-08-21 14:08:53 -0600 |
| commit | d242e2569f10e03dea1d13d54b45d8bb5bbeb614 (patch) | |
| tree | 18806fb989c979a289ef46493eab7611e89a7f19 | |
| parent | d3265de62fb7e9f30c6ad1195d0bf12edcf3d20f (diff) | |
| download | tip-d242e2569f10e03dea1d13d54b45d8bb5bbeb614.tar.gz | |
docs: conf.py: extra cleanups and fixes
Makes it more adehent with modern Sphinx LaTeX build setup as
defined at:
https://www.sphinx-doc.org/en/master/latex.html
There, it suggests:
1) to add: 'printindex'
“printindex” call, the last thing in the file. Override if you want to generate
the index differently, append some content after the index, or change the font.
As LaTeX uses two-column mode for the index it is often advisable to set this
key to r'\footnotesize\raggedright\printindex'.
This indeed solved a corner case on a distro where the index was not properly
generated.
2) to add at the main example:
\PassOptionsToPackage{svgnames}{xcolor}
3) I got a corner case on one of the distros was using xindy to produce
indexes. This ended causing the build logic to incorretly try to use
T1 fontenc, which is not UTF-8 compatible.
This patch adds:
\PassOptionsToPackage{xindy}{language=english,codepage=utf8,noautomatic}
to cover such case. It should be noticed that, as the config doesn't
have \usepackage{xindy}, this will be used only if latexmk ends
using xindy.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/08d16c2ad817910eb5606842f776d3f77d83282f.1755763127.git.mchehab+huawei@kernel.org
| -rw-r--r-- | Documentation/conf.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py index 020ecfa05a0746..8fcecdb927b1a8 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -456,8 +456,15 @@ htmlhelp_basename = "TheLinuxKerneldoc" latex_elements = { # The paper size ('letterpaper' or 'a4paper'). "papersize": "a4paper", + "passoptionstopackages": dedent(r""" + \PassOptionsToPackage{svgnames}{xcolor} + % Avoid encoding troubles when creating indexes + \PassOptionsToPackage{xindy}{language=english,codepage=utf8,noautomatic} + """), # The font size ('10pt', '11pt' or '12pt'). "pointsize": "11pt", + # Needed to generate a .ind file + "printindex": r"\footnotesize\raggedright\printindex", # Latex figure (float) alignment # 'figure_align': 'htbp', # Don't mangle with UTF-8 chars |
