|
19 | 19 | import warnings |
20 | 20 |
|
21 | 21 | import matplotlib |
22 | | -import sphinx |
23 | 22 |
|
24 | 23 | from datetime import datetime |
25 | 24 | import time |
|
49 | 48 | # usage in the gallery. |
50 | 49 | warnings.filterwarnings('error', append=True) |
51 | 50 |
|
52 | | -# Strip backslashes in function's signature |
53 | | -# To be removed when numpydoc > 0.9.x |
54 | | -strip_signature_backslash = True |
55 | | - |
56 | 51 | # Add any Sphinx extension module names here, as strings. They can be |
57 | 52 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
58 | 53 | extensions = [ |
@@ -144,9 +139,7 @@ def _check_dependencies(): |
144 | 139 | warnings.filterwarnings('ignore', category=DeprecationWarning, |
145 | 140 | module='sphinx.util.inspect') |
146 | 141 |
|
147 | | -# missing-references names matches sphinx>=3 behavior, so we can't be nitpicky |
148 | | -# for older sphinxes. |
149 | | -nitpicky = sphinx.version_info >= (3,) |
| 142 | +nitpicky = True |
150 | 143 | # change this to True to update the allowed failures |
151 | 144 | missing_references_write_json = False |
152 | 145 | missing_references_warn_unused_ignores = False |
@@ -429,7 +422,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf, |
429 | 422 | # Sphinx 2.0 adopts GNU FreeFont by default, but it does not have all |
430 | 423 | # the Unicode codepoints needed for the section about Mathtext |
431 | 424 | # "Writing mathematical expressions" |
432 | | -fontpkg = r""" |
| 425 | +latex_elements['fontpkg'] = r""" |
433 | 426 | \IfFontExistsTF{XITS}{ |
434 | 427 | \setmainfont{XITS} |
435 | 428 | }{ |
@@ -469,12 +462,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf, |
469 | 462 | Extension = .otf, |
470 | 463 | ]} |
471 | 464 | """ |
472 | | -latex_elements['fontpkg'] = fontpkg |
473 | 465 |
|
474 | | -# Sphinx <1.8.0 or >=2.0.0 does this by default, but the 1.8.x series |
475 | | -# did not for latex_engine = 'xelatex' (as it used Latin Modern font). |
476 | | -# We need this for code-blocks as FreeMono has wide glyphs. |
477 | | -latex_elements['fvset'] = r'\fvset{fontsize=\small}' |
478 | 466 | # Fix fancyhdr complaining about \headheight being too small |
479 | 467 | latex_elements['passoptionstopackages'] = r""" |
480 | 468 | \PassOptionsToPackage{headheight=14pt}{geometry} |
|
0 commit comments