From e3aaf6309e65ad8d814d9713a20d4e930b07cbe9 Mon Sep 17 00:00:00 2001 From: Arijit De Date: Wed, 31 May 2023 20:50:06 +0530 Subject: [PATCH] Publish PDF version of RTD documentation Made changes in the .readthedocs.yaml to enable format for downloading pdf and epub versions of the documentation and added latex_elements in the conf.py file which generates the pdf without blank pages. The minimum version requirement for sphinx was 6.2.1 which was causing build failure in read the docs, hence changing it 3.3.1 as written in setup.cfg of nexB/aboutcode Signed-off-by: Arijit De --- .readthedocs.yml | 5 +++++ docs/source/conf.py | 6 ++++++ setup.cfg | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 1b71cd9e13d..2a7dc0b40d1 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,6 +5,11 @@ # Required version: 2 +# Build PDF & ePub +formats: + - epub + - pdf + # Where the Sphinx conf.py file is located sphinx: configuration: docs/source/conf.py diff --git a/docs/source/conf.py b/docs/source/conf.py index d5435e75591..39835c69400 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -95,3 +95,9 @@ .. role:: img-title-para """ + +# -- Options for LaTeX output ------------------------------------------------- + +latex_elements = { + 'classoptions': ',openany,oneside' +} \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 18bfbdecb13..b02fd346365 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,6 +58,6 @@ testing = isort docs = - Sphinx == 6.2.1 + Sphinx == 5.1.0 sphinx-rtd-theme >= 0.5.0 doc8 >= 0.8.1