[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cluebat needed: Proper way to reference MathJax.js



On 14 July 2015 at 08:16, Bas Wijnen wrote:
| On Mon, Jul 13, 2015 at 08:01:48PM -0500, Dirk Eddelbuettel wrote:
| > | To make it work only when served by a webbrowser, use this:
| > | 
| > |   <script src="/javascript/mathjax/MathJax.js"></script>
| > 
| > I think this is what I had in mind, thanks!
| >  
| > | ...and make sure javascript-common is installed and in use by the 
| > | web-server (all libjs-* packages should recommend it, and it should be 
| > | enabled by default for apache).
| > 
| > Hm, libjs-mathjax does not. So I'll add two depends.
| >  
| > | To make it work only offline, use this:
| > | 
| > |   <script src="file://usr/share/javascript/mathjax/MathJax.js"></script>
| > 
| > Icky that it is either or!
| >  
| > | To make it work both offline and offline, use this:
| > | 
| > |   <script src="/usr/share/javascript/mathjax/MathJax.js"></script>
| > | 
| > | ...and edit /etc/apache2/conf-available/javascript-common.conf or 
| > | /etc/lighttpd/conf-available/90-javascript-alias.conf to use 
| > | "/usr/share/javascript/" as base path.
| 
| Can't you make a link in the directory of the file referencing it and use
| a non-absolute path, i.e. src="MathJax.js"?  That should work both locally and
| through a browser without any configuration, right?  (Except that the directory
| must be served by the web server, of course.)

I could. What I am unsure about is whether the path gets followed (which you
alude to as well).  I presume it does...

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd@debian.org


Reply to: