aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/conf.py
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2016-11-16 15:39:56 -0700
committerJonathan Corbet <corbet@lwn.net>2016-11-16 15:39:56 -0700
commit3ed3e130ea357eb2870d677327ceed4b39edcca1 (patch)
tree0b5a964d8c076292d2fc64a7a45cefeb4eb18869 /Documentation/conf.py
parentMAINTAINERS: The Chinese documentation moved (diff)
parentdocs: Avoid warning on cleandocs (diff)
downloadlinux-dev-3ed3e130ea357eb2870d677327ceed4b39edcca1.tar.xz
linux-dev-3ed3e130ea357eb2870d677327ceed4b39edcca1.zip
Merge branch 'mauro-pdf' into docs-next
Mauro says: This series address a series of errors during PDF generation from media documentation. The first patch fixes the late redefinition of a LaTeX command at the Sphinx LaTeX style that causes build to break when some cross-references are used. The next two patches fix PDF output issues with subdev-formats.rst. The next 3 patches fix image includes and their output for PDF. It is aligned with Linus request of not having binary-generated images from their SVG source codes. I still intend to move the remaing PNG images to vectorial ones (SVG), as image scale works better, but this will require some additional work. When done, I'll submit as a separate patch series. It should also be noticed that the last patch violates the output dir, when make is used with "O=some_dir", as Sphinx doesn't accept image files outside the source directory. We'll likely need some Sphinx extension in order to fix it, but at least with this series (plus Jani Nikola's PDF fix series), the PDF output should work fine again. [jc: added a commit fixing up a "make cleandocs" warning]
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r--Documentation/conf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py
index bcb1af786e78..db78974aad26 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -37,7 +37,7 @@ from load_config import loadConfig
extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain']
# The name of the math extension changed on Sphinx 1.4
-if minor > 3:
+if major == 1 and minor > 3:
extensions.append("sphinx.ext.imgmath")
else:
extensions.append("sphinx.ext.pngmath")
@@ -332,6 +332,10 @@ latex_elements = {
'''
}
+# Fix reference escape troubles with Sphinx 1.4.x
+if major == 1 and minor > 3:
+ latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
+
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).