@@ -228,22 +228,6 @@ def _check_dependencies():
228
228
}
229
229
230
230
231
- # Sphinx gallery configuration
232
-
233
- def matplotlib_reduced_latex_scraper (block , block_vars , gallery_conf ,
234
- ** kwargs ):
235
- """
236
- Reduce srcset when creating a PDF.
237
-
238
- Because sphinx-gallery runs *very* early, we cannot modify this even in the
239
- earliest builder-inited signal. Thus we do it at scraping time.
240
- """
241
- from sphinx_gallery .scrapers import matplotlib_scraper
242
-
243
- if gallery_conf ['builder_name' ] == 'latex' :
244
- gallery_conf ['image_srcset' ] = []
245
- return matplotlib_scraper (block , block_vars , gallery_conf , ** kwargs )
246
-
247
231
gallery_dirs = [f'{ ed } ' for ed in
248
232
['gallery' , 'tutorials' , 'plot_types' , 'users/explain' ]
249
233
if f'{ ed } /*' not in skip_subdirs ]
@@ -261,7 +245,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
261
245
'examples_dirs' : example_dirs ,
262
246
'filename_pattern' : '^((?!sgskip).)*$' ,
263
247
'gallery_dirs' : gallery_dirs ,
264
- 'image_scrapers' : (matplotlib_reduced_latex_scraper , ),
248
+ 'image_scrapers' : ("sphinxext.util. matplotlib_reduced_latex_scraper" , ),
265
249
'image_srcset' : ["2x" ],
266
250
'junit' : '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '' ,
267
251
'matplotlib_animations' : True ,
@@ -272,11 +256,11 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
272
256
'reset_modules' : (
273
257
'matplotlib' ,
274
258
# clear basic_units module to re-register with unit registry on import
275
- lambda gallery_conf , fname : sys . modules . pop ( 'basic_units' , None )
259
+ "sphinxext.util.clear_basic_unit"
276
260
),
277
- 'subsection_order' : gallery_order .sectionorder ,
261
+ 'subsection_order' : "sphinxext. gallery_order.sectionorder" ,
278
262
'thumbnail_size' : (320 , 224 ),
279
- 'within_subsection_order' : gallery_order .subsectionorder ,
263
+ 'within_subsection_order' : "sphinxext. gallery_order.subsectionorder" ,
280
264
'capture_repr' : (),
281
265
'copyfile_regex' : r'.*\.rst' ,
282
266
}
0 commit comments