Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardcoded mathjax path in docs/conf.py #28547

Closed
antonio-rojas opened this issue Oct 1, 2019 · 11 comments
Closed

Remove hardcoded mathjax path in docs/conf.py #28547

antonio-rojas opened this issue Oct 1, 2019 · 11 comments

Comments

@antonio-rojas
Copy link
Contributor

Use the already existant MATHJAX_DIR env variable instead.

CC: @timokau @saraedum @kiwifb

Component: documentation

Author: Antonio Rojas

Branch/Commit: c5c7786

Reviewer: François Bissey

Issue created by migration from https://trac.sagemath.org/ticket/28547

@antonio-rojas antonio-rojas added this to the sage-9.0 milestone Oct 1, 2019
@antonio-rojas
Copy link
Contributor Author

@antonio-rojas
Copy link
Contributor Author

Author: Antonio Rojas

@antonio-rojas
Copy link
Contributor Author

Commit: c5c7786

@antonio-rojas

This comment has been minimized.

@antonio-rojas
Copy link
Contributor Author

New commits:

c5c7786Replace hardcoded mathjax path with MATHJAX_DIR

@kiwifb
Copy link
Member

kiwifb commented Oct 1, 2019

comment:3

I'd like something slightly different probably because I painted myself in that corner years ago :)

In sage-on-gentoo SAGE_SHARE is /usr/share/sage, that is proper sage only object in share. It is not just /usr/share. I don't want those

fbissey@moonloop ~ $ ll /usr/share/sage
total 48K
drwxr-xr-x  10 root root 4.0K Mar 31  2019 .
drwxr-xr-x 321 root root  12K Sep 22 09:54 ..
drwxr-xr-x   2 root root 4.0K Aug 28  2018 combinatorial_designs
drwxr-xr-x   2 root root 4.0K Aug 28  2018 conway_polynomials
drwxr-xr-x   2 root root 4.0K Aug 28  2018 cremona
drwxr-xr-x   2 root root 4.0K Aug 28  2018 ellcurves
drwxr-xr-x  15 root root 4.0K Mar 31  2019 ext
drwxr-xr-x   2 root root 4.0K Aug 28  2018 graphs
drwxr-xr-x   4 root root 4.0K Aug 28  2018 reflexive_polytopes
drwxr-xr-x   4 root root 4.0K Jun 28 11:17 threejs

directly in /usr/share especially with generic names like ext and graphs. But vanilla sage is expecting SAGE_LOCAL/share which leads to some intense patching in env.py. The point here is that I have

mathjax_relative = '../mathjax'

in sage-on-gentoo not plain mathjax. I would favor os.path.relpath(MATHJAX_DIR,SAGE_SHARE). which means that you also have to restore SAGE_SHARE in the from sage.env.

@antonio-rojas
Copy link
Contributor Author

comment:4

The only use of mathjax_relative is in conf.py:269, when defining the list of files to exclude from source file search. And it is preceded by two asterisks, so it will match anything that ends in '/mathjax' (or whatever MATHJAX_DIR's basename is after applying this patch). So unless I'm missing something, this should still work fine in your setup, right?

@kiwifb
Copy link
Member

kiwifb commented Oct 1, 2019

comment:5

Now that I am looking at the full consequences of your patch it should work as is yes. I never noticed those ** before. I wonder when they were added. I will test things to make sure.

@kiwifb
Copy link
Member

kiwifb commented Oct 1, 2019

Reviewer: François Bissey

@kiwifb
Copy link
Member

kiwifb commented Oct 1, 2019

comment:6

All good!

@vbraun
Copy link
Member

vbraun commented Oct 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants