Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
3b4c9632 00b072c0

+19 -12
+19 -12
Documentation/conf.py
··· 331 331 # -- Options for LaTeX output --------------------------------------------- 332 332 333 333 latex_elements = { 334 - # The paper size ('letterpaper' or 'a4paper'). 335 - 'papersize': 'a4paper', 334 + # The paper size ('letterpaper' or 'a4paper'). 335 + 'papersize': 'a4paper', 336 336 337 - # The font size ('10pt', '11pt' or '12pt'). 338 - 'pointsize': '11pt', 337 + # The font size ('10pt', '11pt' or '12pt'). 338 + 'pointsize': '11pt', 339 339 340 - # Latex figure (float) alignment 341 - #'figure_align': 'htbp', 340 + # Latex figure (float) alignment 341 + #'figure_align': 'htbp', 342 342 343 - # Don't mangle with UTF-8 chars 344 - 'inputenc': '', 345 - 'utf8extra': '', 343 + # Don't mangle with UTF-8 chars 344 + 'inputenc': '', 345 + 'utf8extra': '', 346 346 347 - # Additional stuff for the LaTeX preamble. 347 + # Set document margins 348 + 'sphinxsetup': ''' 349 + hmargin=0.5in, vmargin=1in, 350 + parsedliteralwraps=true, 351 + verbatimhintsturnover=false, 352 + ''', 353 + 354 + # Additional stuff for the LaTeX preamble. 348 355 'preamble': ''' 349 - % Use some font with UTF-8 support with XeLaTeX 356 + % Use some font with UTF-8 support with XeLaTeX 350 357 \\usepackage{fontspec} 351 358 \\setsansfont{DejaVu Sans} 352 359 \\setromanfont{DejaVu Serif} 353 360 \\setmonofont{DejaVu Sans Mono} 354 - ''' 361 + ''', 355 362 } 356 363 357 364 # At least one book (translations) may have Asian characters