You are not logged in.

#1 2017-08-04 18:03:29

shevket
Member
Registered: 2017-07-19
Posts: 13

[solved] Mathjax

Hi all,
I'm trying to install a local copy of MathJax on my Arch Linux server.

A google search for arch + mathjax returned old (out-dated?) web pages for mathjax AUR packages, etc.
But it also seems that it has been recently added to community repos
and I was able to install it as simply as:

 pacman -S mathjax 

However there is no wikipage for the package yet, and I'm still looking for the proper way to configure and link my web sources to mathjax.

Trying to replace the CDN source with what I believe to be the main file:

 <script src="/usr/share/mathjax/MathJax.js"></script> 

doesn't work, and I don't think it has anything to do with permissions.
Does any one know how to do this?

(Building from git source or installing via npm might be easier alternatives at the moment... )

Any advice appreciated,
Thanks

EDIT:

The script can't be sourced outside the web server's hierarchy obviously -.-
So one needs to create symlinks for the whole package:

cp -rs /usr/share/mathjax </server/root/dir>/mathjax

then it runs from any html file in the server's root directory with:

<script src="mathjax/MathJax.js"></script>

Last edited by shevket (2017-08-05 12:11:05)

Offline

#2 2017-08-04 19:04:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [solved] Mathjax

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-08-04 21:32:55

shevket
Member
Registered: 2017-07-19
Posts: 13

Re: [solved] Mathjax

@jasonwryan : MathJax is not in the AUR but in community since april, so this is not a PKGBUILD issue.
This older topic on the forum here relates to an AUR PKGBUILD, but is clearly outdated (2012). 

The original aim of this post was the absence of configuration guidelines for this now official package in the wiki. Well here's one now. Someone more competent might want to edit it!

Offline

#4 2017-08-04 21:40:29

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,678
Website

Re: [solved] Mathjax

Mod note: Looks like this was moved in error. I'm not sure where this was originally, but moving to Applications/DEs.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2017-08-05 11:11:29

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [solved] Mathjax

IIRC, it was originally posted in "Forum & Wiki discussion", which kind of makes sense, as it's about the Mathjax wiki article.

shevket wrote:

However there is no wikipage for the package yet

I see this wiki article. And there is also the upstream documentation.


pkgs │ hacks │ cfg │ blag

Offline

#6 2017-08-05 12:10:26

shevket
Member
Registered: 2017-07-19
Posts: 13

Re: [solved] Mathjax

Only thing was the upstream doc doesn't provide any info about the arch package specific installation.

I wrote the wiki page wondering if it were not easier to specify a target directory to pacman but it doesn't seem a good think to do,
so creating symlinks should be the best solution.

This is probably enough for the archwiki so I'll mark the topic solved : )

Offline

#7 2017-08-05 15:40:22

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [solved] Mathjax

Ah, I hadn't noticed it was you who created that page, I'm sorry smile

Given what Mathjax is, symlinking the files to within your site's hierarchy for use as CDN probably seems the most sane way.


pkgs │ hacks │ cfg │ blag

Offline

#8 2017-08-06 13:06:45

shevket
Member
Registered: 2017-07-19
Posts: 13

Re: [solved] Mathjax

Thanks for confirming that smile

Offline

Board footer

Powered by FluxBB