Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Remove mathjax configuration/symlink from jupyter notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jan 18, 2021
1 parent 13b4090 commit 2d68ed7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
6 changes: 0 additions & 6 deletions build/pkgs/notebook/jupyter_notebook_config.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Configuration file for Sage's builtin Jupyter notebook server

# Note for distributors: Sage uses mathjax, so the notebook server
# needs to have the mathjax_url set to wherever your distribution
# installs mathjax.

c.NotebookApp.mathjax_url = 'nbextensions/mathjax/MathJax.js'

# Disable XSRF checking to fix Thebe. See
# * https://trac.sagemath.org/ticket/22458
# * https://github.com/oreillymedia/thebe/issues/93
Expand Down
20 changes: 1 addition & 19 deletions src/sage/repl/ipython_kernel/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from sage.env import (
SAGE_DOC, SAGE_VENV, SAGE_EXTCODE,
SAGE_VERSION,
MATHJAX_DIR, THREEJS_DIR,
THREEJS_DIR,
)


Expand Down Expand Up @@ -114,23 +114,6 @@ def symlink(self, src, dst):
return
os.symlink(src, dst)

def use_local_mathjax(self):
"""
Symlink SageMath's Mathjax install to the Jupyter notebook.
EXAMPLES::
sage: from sage.repl.ipython_kernel.install import SageKernelSpec
sage: spec = SageKernelSpec(prefix=tmp_dir())
sage: spec.use_local_mathjax()
sage: mathjax = os.path.join(spec.nbextensions_dir, 'mathjax')
sage: os.path.isdir(mathjax)
True
"""
src = MATHJAX_DIR
dst = os.path.join(self.nbextensions_dir, 'mathjax')
self.symlink(src, dst)

def use_local_threejs(self):
"""
Symlink threejs to the Jupyter notebook.
Expand Down Expand Up @@ -255,7 +238,6 @@ def update(cls, *args, **kwds):
"""
instance = cls(*args, **kwds)
instance.use_local_mathjax()
instance.use_local_threejs()
instance._install_spec()
instance._symlink_resources()
Expand Down

0 comments on commit 2d68ed7

Please sign in to comment.