[alternate 2267] Offline mathjax #2446

Merged
merged 6 commits into from Dec 28, 2012

Conversation

Projects
None yet
3 participants
@Carreau
Owner

Carreau commented Sep 29, 2012

Allow mathjax to be install from already downloaded tarball
#2267 + fixes the author does not have time to make.

stsci-sienkiew and others added some commits Aug 7, 2012

a few fixes
- default back tom Mathjax2.0
- install to profile by default
- fix in doc
- fix bad return
docs/source/install/install.txt
-you have a system-wide Python install, it may need to be done from a ``sudo
-python`` session.
+If you need tighter configuration control, you can download your own copy
+of MathJax from http://www.mathjax.org/download/ - use the MathJax-1.1 link.

This comment has been minimized.

Show comment Hide comment
@ellisonbg

ellisonbg Nov 1, 2012

Owner

This should be updated to say the 2.0 link, right?

@ellisonbg

ellisonbg Nov 1, 2012

Owner

This should be updated to say the 2.0 link, right?

IPython/external/mathjax.py
- # check for existence and permissions
+# Where mathjax will be installed.
+
+dest = os.path.join(locate_profile('default'), 'static')

This comment has been minimized.

Show comment Hide comment
@ellisonbg

ellisonbg Nov 1, 2012

Owner

Do we want the profile to be configurable by passing a kwarg or also at the command line?

@ellisonbg

ellisonbg Nov 1, 2012

Owner

Do we want the profile to be configurable by passing a kwarg or also at the command line?

This comment has been minimized.

Show comment Hide comment
@ellisonbg

ellisonbg Nov 1, 2012

Owner

Opps, you removed the locate_profile above so the function fails with a NameError.

@ellisonbg

ellisonbg Nov 1, 2012

Owner

Opps, you removed the locate_profile above so the function fails with a NameError.

IPython/external/mathjax.py
+ replace : bool [False]
+ Whether to remove and replace an existing install.
+ tag : str ['v2.0']
+ Which tag to download. Default is 'v1.1', the current stable release,

This comment has been minimized.

Show comment Hide comment
@ellisonbg

ellisonbg Nov 1, 2012

Owner

Default is now 2.0.

@ellisonbg

ellisonbg Nov 1, 2012

Owner

Default is now 2.0.

IPython/external/mathjax.py
+ replace = False
+
+ # undocumented test interface
+ if '-test' in args :

This comment has been minimized.

Show comment Hide comment
@ellisonbg

ellisonbg Nov 1, 2012

Owner

We should still use the same command line naming convention so this would be --test.

@ellisonbg

ellisonbg Nov 1, 2012

Owner

We should still use the same command line naming convention so this would be --test.

@Carreau

This comment has been minimized.

Show comment Hide comment
@Carreau

Carreau Nov 3, 2012

Owner

I can't import locate_profile but can't figure out why :

$ python IPython/external/mathjax.py        
Traceback (most recent call last):
  File "IPython/external/mathjax.py", line 54, in <module>
    from IPython.utils.path import locate_profile
  File "/Users/bussonniermatthias/ipython/IPython/__init__.py", line 43, in <module>
    from .config.loader import Config
  File "/Users/bussonniermatthias/ipython/IPython/config/__init__.py", line 16, in <module>
    from .application import *
  File "/Users/bussonniermatthias/ipython/IPython/config/application.py", line 29, in <module>
    from IPython.external.decorator import decorator
ImportError: cannot import name decorator
Owner

Carreau commented Nov 3, 2012

I can't import locate_profile but can't figure out why :

$ python IPython/external/mathjax.py        
Traceback (most recent call last):
  File "IPython/external/mathjax.py", line 54, in <module>
    from IPython.utils.path import locate_profile
  File "/Users/bussonniermatthias/ipython/IPython/__init__.py", line 43, in <module>
    from .config.loader import Config
  File "/Users/bussonniermatthias/ipython/IPython/config/__init__.py", line 16, in <module>
    from .application import *
  File "/Users/bussonniermatthias/ipython/IPython/config/application.py", line 29, in <module>
    from IPython.external.decorator import decorator
ImportError: cannot import name decorator
@Carreau

This comment has been minimized.

Show comment Hide comment
@Carreau

Carreau Nov 3, 2012

Owner

Ok, another try.

most of the parameters should be configurable via the command line.

Owner

Carreau commented Nov 3, 2012

Ok, another try.

most of the parameters should be configurable via the command line.

@Carreau

This comment has been minimized.

Show comment Hide comment
@Carreau

Carreau Dec 28, 2012

Owner
$ python -m IPython.external.mathjax

does not work if .../static/ does not exist.

Owner

Carreau commented Dec 28, 2012

$ python -m IPython.external.mathjax

does not work if .../static/ does not exist.

@Carreau

This comment has been minimized.

Show comment Hide comment
@Carreau

Carreau Dec 28, 2012

Owner

Now fixed, and works, and as nobody want to test it, I'm going to merge this.

Owner

Carreau commented Dec 28, 2012

Now fixed, and works, and as nobody want to test it, I'm going to merge this.

Carreau added a commit that referenced this pull request Dec 28, 2012

Merge pull request #2446 from Carreau/offline_mathjax
Refactor mathjax install

alternativ to PR 2267.

Install mathjax in .profile/static with a few option to install from already downloaded tarballs or select other install path.

@Carreau Carreau merged commit b84547f into ipython:master Dec 28, 2012

1 check passed

default The Travis build passed
Details

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Merge pull request #2446 from Carreau/offline_mathjax
Refactor mathjax install

alternativ to PR 2267.

Install mathjax in .profile/static with a few option to install from already downloaded tarballs or select other install path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment