@@ -68,8 +68,12 @@ def make_meta_rst(last_release):
6868extensions = [
6969 'sphinx.ext.autodoc' ,
7070 'sphinx.ext.intersphinx' ,
71- 'sphinx_copybutton' ,
7271]
72+ try :
73+ import sphinx_copybutton
74+ extensions .append ('sphinx_copybutton' )
75+ except ImportError :
76+ pass
7377
7478# Add any paths that contain templates here, relative to this directory.
7579templates_path = ['_templates' ]
@@ -80,6 +84,17 @@ def make_meta_rst(last_release):
8084# The master toctree document.
8185master_doc = 'index'
8286
87+ # Enable automatic numbering of figures, tables and code-blocks
88+ numfig = True
89+
90+ # Strings to format figure, table, code-block, and section numbers
91+ numfig_format = {
92+ 'figure' : "Figure %s" ,
93+ 'table' : "Table %s" ,
94+ 'code-block' : "Snippet %s" ,
95+ 'section' : "Section %s" ,
96+ }
97+
8398# The language for content autogenerated by Sphinx. Refer to documentation
8499# for a list of supported languages.
85100#
@@ -102,7 +117,10 @@ def make_meta_rst(last_release):
102117
103118# -- Options for intersphinx extension ---------------------------------------
104119
105- intersphinx_mapping = {'python' : ('https://docs.python.org/3' , None )}
120+ intersphinx_mapping = {
121+ 'python' : ('https://docs.python.org/3' , None ),
122+ 'lxml' : ('https://lxml.de/apidoc/' , None ),
123+ }
106124
107125# -- Options for HTML output -------------------------------------------------
108126
0 commit comments