# Bug#739300: dh_sphinxdoc: Please replace MathJax.js with links to the packaged libjs-mathjax

Hi!

On Sun, Dec 04, 2016 at 11:51:38AM +0300, Dmitry Shachnev wrote:
> Hi Ximin!
>
> On Sat, Dec 03, 2016 at 01:49:00AM +0000, Ximin Luo wrote:
> > Could dh_sphinxdoc not scan the html files for <script src="\$that_value"...
> > pretty sophisticated regex-based sanity checks (e.g. relating to #841141
> > which I filed recently) - so adding a replacement rule shouldn't be too hard
> > right?
> >
> > I can try to write this patch too, when I have some time.
>
> Actually, I just haven’t thought about the idea of replacing that by regex.
> This seemed less sane to me than modifying conf files.
>
> However, as you volunteered to write a patch, I will accept it. Ideally that
> regex should be smart enough to replace only actually included JS files
> in the HTML head, i.e. it should not touch the examples of using MathJax in
> MathJax’ own documentation. I don’t know whether that is easy to implement,
> though.
>
> > BTW can someone point me to some discussion/documentation on precisely
> > how/why symlinks to directories mess with dpkg? I was not aware of this -
> > I have added quite a lot of directory-symlinks to some of my recent JS
> > packages, and we will likely have to do this for ipywidgets, with mathjax...
>
> See [1]. You can use dpkg-maintscript-helper’s “symlink_to_dir” command to
> deal with that in your packages.
>
> Note that for MathJax you should not create any symlinks, just specify the
> path to packaged MathJax in your conf.py, as described in [2].
>
> [1]:
> [2]: http://www.sphinx-doc.org/en/stable/ext/math.html#confval-mathjax_path
>
> --
> Dmitry Shachnev

Any progress on this patch?  I'd like to use this method to solve bug
#829361

Cheers,
Nicholas


signature.asc
Description: PGP signature

• Bug#739300: dh_sphinxdoc: Please replace MathJax.js wit... Nicholas D Steeves