File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1798,13 +1798,18 @@ def apply(self):
17981798
17991799
18001800class ForceEquations (docutils .transforms .Transform ):
1801- """Unconditionally enable equations on notebooks."""
1801+ """Unconditionally enable equations on notebooks.
1802+
1803+ Except if ``nbsphinx_assume_equations`` is set to ``False``.
1804+
1805+ """
18021806
18031807 default_priority = 900 # after checking for equations in MathDomain
18041808
18051809 def apply (self ):
18061810 env = self .document .settings .env
1807- env .get_domain ('math' ).data ['has_equations' ][env .docname ] = True
1811+ if env .config .nbsphinx_assume_equations :
1812+ env .get_domain ('math' ).data ['has_equations' ][env .docname ] = True
18081813
18091814
18101815class GetSizeFromImages (
@@ -2229,6 +2234,7 @@ def setup(app):
22292234 app .add_config_value ('nbsphinx_widgets_path' , None , rebuild = 'html' )
22302235 app .add_config_value ('nbsphinx_widgets_options' , {}, rebuild = 'html' )
22312236 app .add_config_value ('nbsphinx_thumbnails' , {}, rebuild = 'html' )
2237+ app .add_config_value ('nbsphinx_assume_equations' , True , rebuild = 'env' )
22322238
22332239 app .add_directive ('nbinput' , NbInput )
22342240 app .add_directive ('nboutput' , NbOutput )
You can’t perform that action at this time.
0 commit comments