summaryrefslogtreecommitdiff
path: root/Documentation/conf.py
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-03 16:58:00 +0100
committerJonathan Corbet <corbet@lwn.net>2021-03-08 17:20:03 -0700
commit3b4c963243b1cac1882c2a557152d5444580a751 (patch)
treee3f31e7c852fa16037398be3a0bcdc713b2735e6 /Documentation/conf.py
parent00b072c011c540b269d2d7f6fbc17c3b33b445d0 (diff)
docs: conf.py: adjust the LaTeX document output
Changeset f546ff0c0c07 ("Move our minimum Sphinx version to 1.7") cleaned up some compatibility issues with previous Sphinx versions, but it also dropped the PDF margin sets. Without that, the media documentation won't build fine, as the margins are too wide to display texts with monospaced fonts. While here, align the "latex_elements = {" values, and add a few other sphinxsetup configs in order to allow Sphinx to wrap long lines on literal blocks. Fixes: f546ff0c0c07 ("Move our minimum Sphinx version to 1.7") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Documentation/conf.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) Link: https://lore.kernel.org/r/911fbac185dd09c7df715cf4153361b81f04b7ad.1614787053.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r--Documentation/conf.py31
1 files changed, 19 insertions, 12 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py
index fd65168c10f8..879e86dbea66 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -331,27 +331,34 @@ htmlhelp_basename = 'TheLinuxKerneldoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-'papersize': 'a4paper',
+ # The paper size ('letterpaper' or 'a4paper').
+ 'papersize': 'a4paper',
-# The font size ('10pt', '11pt' or '12pt').
-'pointsize': '11pt',
+ # The font size ('10pt', '11pt' or '12pt').
+ 'pointsize': '11pt',
-# Latex figure (float) alignment
-#'figure_align': 'htbp',
+ # Latex figure (float) alignment
+ #'figure_align': 'htbp',
-# Don't mangle with UTF-8 chars
-'inputenc': '',
-'utf8extra': '',
+ # Don't mangle with UTF-8 chars
+ 'inputenc': '',
+ 'utf8extra': '',
-# Additional stuff for the LaTeX preamble.
+ # Set document margins
+ 'sphinxsetup': '''
+ hmargin=0.5in, vmargin=1in,
+ parsedliteralwraps=true,
+ verbatimhintsturnover=false,
+ ''',
+
+ # Additional stuff for the LaTeX preamble.
'preamble': '''
- % Use some font with UTF-8 support with XeLaTeX
+ % Use some font with UTF-8 support with XeLaTeX
\\usepackage{fontspec}
\\setsansfont{DejaVu Sans}
\\setromanfont{DejaVu Serif}
\\setmonofont{DejaVu Sans Mono}
- '''
+ ''',
}
# At least one book (translations) may have Asian characters