aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-11-14 11:32:27 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-12 05:39:32 -0500
commitcd6d9ffffc4c2ce545e9d8dfcc7fe562cb02b4ea (patch)
tree3a7f2ad64834f1bbcecedf84b5ad7494bad35b46 /Documentation
parent66c6770379368ba0738a61c2317edc0ca324b902 (diff)
docs-rst: fix LaTeX \DURole renewcommand with Sphinx 1.3+
commit e2a91f4f42018994d7424d405900d17eba6555d0 upstream. PDF build on Kernel 4.9-rc? returns an error with Sphinx 1.3.x and Sphinx 1.4.x, when trying to solve some cross-references. The solution is to redefine the \DURole macro. However, this is redefined too late. Move such redefinition to LaTeX preamble and bind it to just the Sphinx versions where the error is known to be present. Tested by building the documentation on interactive mode: make PDFLATEX=xelatex -C Documentation/output/./latex Fixes: e61a39baf74d ("[media] index.rst: Fix LaTeX error in interactive mode on Sphinx 1.4.x") Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/conf.py6
-rw-r--r--Documentation/media/index.rst5
2 files changed, 5 insertions, 6 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py
index bf6f310e5170..d769cd89a9f7 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -37,7 +37,7 @@ from load_config import loadConfig
37extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include', 'cdomain'] 37extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include', 'cdomain']
38 38
39# The name of the math extension changed on Sphinx 1.4 39# The name of the math extension changed on Sphinx 1.4
40if minor > 3: 40if major == 1 and minor > 3:
41 extensions.append("sphinx.ext.imgmath") 41 extensions.append("sphinx.ext.imgmath")
42else: 42else:
43 extensions.append("sphinx.ext.pngmath") 43 extensions.append("sphinx.ext.pngmath")
@@ -332,6 +332,10 @@ latex_elements = {
332 ''' 332 '''
333} 333}
334 334
335# Fix reference escape troubles with Sphinx 1.4.x
336if major == 1 and minor > 3:
337 latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n'
338
335# Grouping the document tree into LaTeX files. List of tuples 339# Grouping the document tree into LaTeX files. List of tuples
336# (source start file, target name, title, 340# (source start file, target name, title,
337# author, documentclass [howto, manual, or own class]). 341# author, documentclass [howto, manual, or own class]).
diff --git a/Documentation/media/index.rst b/Documentation/media/index.rst
index e347a3e7bdef..7f8f0af620ce 100644
--- a/Documentation/media/index.rst
+++ b/Documentation/media/index.rst
@@ -1,11 +1,6 @@
1Linux Media Subsystem Documentation 1Linux Media Subsystem Documentation
2=================================== 2===================================
3 3
4.. Sphinx 1.4.x has a definition for DUrole that doesn't work on alltt blocks
5.. raw:: latex
6
7 \renewcommand*{\DUrole}[2]{ #2 }
8
9Contents: 4Contents:
10 5
11.. toctree:: 6.. toctree::