From 2482c4476c54347e652824ad2ec41e3a37b78c0b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 10 Jan 2018 17:45:17 -0300 Subject: [PATCH] Fix #7: Add info to the README to generate the pdf version --- README.md | 10 +++++++++- source/conf.py | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e8678b94..64ace9c9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Documentation is generated with Sphinx. Setup ----- -> sudo apt-get install python3-sphinx python3-sphinxcontrib.spelling +> sudo apt-get install python3-sphinx python3-sphinxcontrib.spelling Outputing Docs -------------- @@ -22,6 +22,14 @@ Outputing Docs ### For an epub > make epub +### For a pdf (Work in progress) +> apt install latexmk # the latexpdf builder needs it +> apt install texlive-full # Attention, this is very huge + # We should to list the individual packages we need +> make latex # Generate the latex files +> make latexpdf # Will generate the pdf file + + Other useful commands --------------------- diff --git a/source/conf.py b/source/conf.py index 67e0a802..f4f1f6c1 100644 --- a/source/conf.py +++ b/source/conf.py @@ -440,3 +440,10 @@ epub_exclude_files = ['search.html'] intersphinx_mapping = {'https://docs.python.org/': None} locale_dirs = ['../locales/'] + +# Remove blank pages +# https://evolvingweb.ca/blog/writing-documentation-restructured-text-and-sphinx +latex_elements = { + 'classoptions': ',oneside', + 'babel': '\\usepackage[english]{babel}' +}