diff options
authorMauro Carvalho Chehab <>2019-07-09 06:52:36 -0300
committerMauro Carvalho Chehab <>2019-07-17 06:57:51 -0300
commit9d42afbe6bd4ce6d424159715e4abf3ea3ddb789 (patch)
parentbff9e34c678552eb172916d9288913e8bd8cc9d1 (diff)
docs: pdf: add all Documentation/*/index.rst to PDF output
Currently, all index files should be manually added to the latex_documents array at While this allows fine-tuning some LaTeX specific things, like the name of the output file and the name of the document, it is not uncommon to forget adding new documents there. So, add a logic that will seek for all Documentation/*/index.rst. If the index is not yet at latex_documents, it includes using a reasonable default. Signed-off-by: Mauro Carvalho Chehab <>
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/ b/Documentation/
index 3b2397bcb565..13b5f711bddf 100644
--- a/Documentation/
+++ b/Documentation/
@@ -410,6 +410,21 @@ latex_documents = [
'The kernel development community', 'manual'),
+# Add all other index files from Documentation/ subdirectories
+for fn in os.listdir('.'):
+ doc = os.path.join(fn, "index")
+ if os.path.exists(doc + ".rst"):
+ has = False
+ for l in latex_documents:
+ if l[0] == doc:
+ has = True
+ break
+ if not has:
+ latex_documents.append((doc, fn + '.tex',
+ 'Linux %s Documentation' % fn.capitalize(),
+ 'The kernel development community',
+ 'manual'))
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None