Skip to content

Commit

Permalink
remove mtext
Browse files Browse the repository at this point in the history
  • Loading branch information
douden committed Dec 10, 2024
1 parent e1a4bd5 commit 6587be3
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/sphinx_tudelft_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,35 @@ def set_favicon(app,conf):
else:
print('Using user-defined favicon')

def set_mtext(app,conf):
if conf.tud_change_mtext:
print('Changing mtext font to inherited from html')
old = app.config
if 'mathjax3_config' in old:
old_mj = old.mathjax3_config
if 'chtml' in old_mj:
old.mathjax3_config['chtml'] = old.mathjax3_config['chtml'] | {'mtextInheritFont': True}
else:
old.mathjax3_config['chtml'] = {'mtextInheritFont': True}
else:
old['mathjax3_config'] = {'chtml': {'mtextInheritFont': True}}
# def set_mtext(app,conf):
# if conf.tud_change_mtext:
# print('Changing mtext font to inherited from html')
# old = app.config
# if 'mathjax3_config' in old:
# old_mj = old.mathjax3_config
# if 'chtml' in old_mj:
# old.mathjax3_config['chtml'] = old.mathjax3_config['chtml'] | {'mtextInheritFont': True}
# else:
# old.mathjax3_config['chtml'] = {'mtextInheritFont': True}
# else:
# old['mathjax3_config'] = {'chtml': {'mtextInheritFont': True}}

app.config = old
else:
print('Using default/user defined mtext font')
# app.config = old
# else:
# print('Using default/user defined mtext font')

def setup(app: Sphinx):
app.setup_extension('sphinx_favicon')
app.add_config_value('tud_change_logo', True, 'env')
app.add_config_value('tud_change_favicon', True, 'env')
app.add_config_value('tud_change_mtext', True, 'env')
# app.add_config_value('tud_change_mtext', True, 'env')
app.add_css_file('tudelft_style.css')
app.connect('build-finished', copy_stylesheet)
app.connect('build-finished', copy_logos)
app.connect('build-finished', copy_favicon)
app.connect('config-inited',set_logo)
app.connect('config-inited',set_favicon)
app.connect('config-inited',set_mtext)
# app.connect('config-inited',set_mtext)
return {
"version": __version__,
"parallel_read_safe": True,
Expand Down

0 comments on commit 6587be3

Please sign in to comment.