FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/doc/sphinxext/util.py at main · spha-code/matplotlib · GitHub
spha-code
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
doc
/
sphinxext
/
util.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (15 loc) · 724 Bytes
Breadcrumbs
matplotlib
/
doc
/
sphinxext
/
util.py
Copy path
File metadata and controls
21 lines (15 loc) · 724 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import
sys
def
matplotlib_reduced_latex_scraper
(
block
,
block_vars
,
gallery_conf
,
**
kwargs
):
"""
Reduce srcset when creating a PDF.
Because sphinx-gallery runs *very* early, we cannot modify this even in the
earliest builder-inited signal. Thus we do it at scraping time.
"""
from
sphinx_gallery
.
scrapers
import
matplotlib_scraper
if
gallery_conf
[
'builder_name'
]
==
'latex'
:
gallery_conf
[
'image_srcset'
]
=
[]
return
matplotlib_scraper
(
block
,
block_vars
,
gallery_conf
,
**
kwargs
)
# Clear basic_units module to re-register with unit registry on import.
def
clear_basic_units
(
gallery_conf
,
fname
):
return
sys
.
modules
.
pop
(
'basic_units'
,
None
)
Back
|
FazBrowse Home
|
New Git URL