Skip to content

Commit

Permalink
Actually enable Mathjax with enable_mathjax (#5904)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Oct 2, 2023
1 parent 38e0b39 commit d549136
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion holoviews/ipython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def __call__(self, *args, **params):
same_cell_execution = getattr(self, '_repeat_execution_in_cell', False)
for r in [r for r in resources if r != 'holoviews']:
Store.renderers[r].load_nb(inline=p.inline)
Renderer.load_nb(inline=p.inline, reloading=same_cell_execution, enable_mathjax=self.enable_mathjax)
Renderer.load_nb(inline=p.inline, reloading=same_cell_execution, enable_mathjax=p.enable_mathjax)

if hasattr(ip, 'kernel') and not loaded:
Renderer.comm_manager.get_client_comm(notebook_extension._process_comm_msg,
Expand Down
3 changes: 3 additions & 0 deletions holoviews/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,9 @@ def __call__(self, *args, **params):

import panel as pn

if params.get("enable_mathjax", False) and selected_backend == "bokeh":
pn.extension("mathjax")

if pn.config.comms == "default":
if "google.colab" in sys.modules:
pn.config.comms = "colab"
Expand Down

0 comments on commit d549136

Please sign in to comment.