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

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

On 13 July 2015 at 01:40, Jonas Smedegaard wrote:
| Hi Dirk,
| Quoting Dirk Eddelbuettel (2015-07-12 23:36:43)
| > An infrequently updated package has doxygen documentation with lots of
| >
| >  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js";></script>
| >
| > which lintian complains about as the page goes to a remote site. But 
| > exactly what string am I suppose to place in src="..."?
| >
| > I can't just to do
| >
| >  <script src="file://usr/share/javascript/mathjax/MathJax.js"></script>
| >
| > as that would presume a global filesystem view of the webbrowser.
| >
| > And given our different web servers, is there a common root, say,
| > /javascript/, for all of them?
| >
| > Quick help would greatly appreciated.  Please do CC me as I am not 
| > currently subscribed to d-devel.
| 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.

I can't easily do that from my documentation package, can I?

| There's a bug about that issue: https://bugs.debian.org/553173
| And an old thread: 
| https://lists.alioth.debian.org/pipermail/pkg-javascript-devel/2013-August/005894.html
| Please consider sharing your opinions at either of those places.

I don't do that much web programming within Debian and don't feel I can add
anything.  I would really like for this to have a clean and generic solution.
But sadly wishing alone does not make it so -- some problems are hard.

Thanks for your help!


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

Reply to: