JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
823 stars 94 forks source link

[FR]Is there are customize the md2html.tpl #394

Open Farrukhqazi opened 4 years ago

Farrukhqazi commented 4 years ago

So I create some HTML reports using weave in my code, and then publish that HTML on another application UI. The problem is that this application is hosted on a server that doesn't have access to the internet. Which means when I try to render the output from Weave, the javascript file that comes from the template md2html.tpl would not be loaded as the server doesn't have access to the internet.

Is there a way I can alter the script tag in output HTML, so that I can point it to let's a local copy of the js?

The below is taken from md2.html.tpl to reference the js file.

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
      TeX: { equationNumbers: { autoNumber: "AMS" } }
    });
  </script>

  <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
  </script>