diff --git a/.travis.yml b/.travis.yml index fda4f5cf..c299e6b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,15 @@ # http://lint.travis-ci.org/ language: python sudo: false -python: - - 3.6 - - 2.7 env: - SPHINX_SPEC="Sphinx==1.2.3" - SPHINX_SPEC="Sphinx" +matrix: + include: + - python: 3.6 + - python: 2.7 + env: + - SPHINXOPTS='-W' cache: directories: - $HOME/.cache/pip @@ -23,5 +26,5 @@ script: - nosetests numpydoc - | cd ../doc - make html - make latexpdf + make SPHINXOPTS=$SPHINXOPTS html + make SPHINXOPTS=$SPHINXOPTS latexpdf diff --git a/doc/conf.py b/doc/conf.py index 5a311bca..ef2788e2 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -41,13 +41,19 @@ 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', - 'sphinx.ext.pngmath', 'sphinx.ext.todo', 'numpydoc', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', ] +try: + import sphinx.ext.imgmath # noqa +except ImportError: + extensions.append('sphinx.ext.pngmath') +else: + extensions.append('sphinx.ext.imgmath') + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -149,13 +155,12 @@ html_sidebars = {} html_title = "%s v%s Manual" % (project, version) -html_static_path = ['_static'] html_last_updated_fmt = '%b %d, %Y' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied @@ -264,5 +269,5 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('http://docs.python.org/', None), - 'scikit-learn': ('http://scikit-learn.org/stable/', None), + 'scikitlearn': ('http://scikit-learn.org/stable/', None), } diff --git a/doc/format.rst b/doc/format.rst index 9b3b0ca5..c30ca4fd 100644 --- a/doc/format.rst +++ b/doc/format.rst @@ -374,7 +374,7 @@ The sections of a function's docstring are: and neural-network techniques," Computers & Geosciences, vol. 22, pp. 585-588, 1996. - which renders as + which renders as [1]_: .. [1] O. McNoleg, "The integration of GIS, remote sensing, expert systems and adaptive co-kriging for environmental habitat