diff --git a/doc-requirements.txt b/doc-requirements.txt index 9c2c189e9151..e62282562ea0 100644 --- a/doc-requirements.txt +++ b/doc-requirements.txt @@ -6,7 +6,7 @@ # Install the documentation requirements with: # pip install -r doc-requirements.txt # -sphinx>1.0 +sphinx>1.0,!=1.5.0 numpydoc ipython mock diff --git a/doc/conf.py b/doc/conf.py index d9619d104708..849ac11ec8dc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -241,9 +241,6 @@ # The paper size ('letter' or 'a4'). latex_paper_size = 'letter' -# The font size ('10pt', '11pt' or '12pt'). -latex_font_size = '11pt' - # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). @@ -258,8 +255,9 @@ # the title page. latex_logo = None +latex_elements = {} # Additional stuff for the LaTeX preamble. -latex_preamble = r""" +latex_elements['preamble'] = r""" % In the parameters section, place a newline after the Parameters % header. (This is stolen directly from Numpy's conf.py, since it % affects Numpy-style docstrings). @@ -279,6 +277,7 @@ \usepackage{enumitem} \setlistdepth{2048} """ +latex_elements['pointsize'] = '11pt' # Documents to append as an appendix to all manuals. latex_appendices = [] @@ -286,7 +285,10 @@ # If false, no module index is generated. latex_use_modindex = True -latex_use_parts = True +if hasattr(sphinx, 'version_info') and sphinx.version_info[:2] >= (1, 4): + latex_toplevel_sectioning = 'part' +else: + latex_use_parts = True # Show both class-level docstring and __init__ docstring in class # documentation