By default, Sphinx documentation outputs a PDF that's formatted for duplex printing. So there is a blank page between the title page and the TOC, the TOC and the introduction, the introduction and the first section, etc.
My users are always going to look at the PDF online. So I would like to remove these blank pages.
This seems to be a vexed issue in Sphinx. See this email thread.
This user suggests two solutions, but neither work for me. Curiously, the first solution:
latex_elements = {
'classoptions': ',oneside',
}
gives me
! Package babel Error: You haven't specified a language option.
The second option:
latex_font_size = '10pt,oneside'
runs, but produces a PDF that only has the odd-numbered pages of my document. Alas.
Does anyone know how to produce a PDF without these blank pages?
To get rid of these empty pages, just add the oneside option (or alternatively, the openany option) to your document class declaration.
Put this in your source/conf.py
configuration file in the "Options for LaTeX output" section:
latex_elements = { 'extraclassoptions': 'openany,oneside' }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With