javascript.php 2.0 KB

12345678910111213141516171819202122232425262728
  1. /////////////////////////////////////////////////////////////////////////////
  2. // //
  3. // NOTICE OF COPYRIGHT //
  4. // //
  5. // Moodle - Filter for converting ASCIImath notation to MathML //
  6. // Now also handles a larger subset of LaTeX, as well as ASCIIsvg //
  7. // //
  8. // Copyright (C) 2007 by Peter Jipsen //
  9. // This program is free software; you can redistribute it and/or modify //
  10. // it under the terms of the GNU General Public License as published by //
  11. // the Free Software Foundation; either version 2 of the License, or //
  12. // (at your option) any later version. //
  13. // //
  14. // This program is distributed in the hope that it will be useful, //
  15. // but WITHOUT ANY WARRANTY; without even the implied warranty of //
  16. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
  17. // GNU General Public License for more details: //
  18. // //
  19. // http://www.gnu.org/copyleft/gpl.html //
  20. // //
  21. /////////////////////////////////////////////////////////////////////////////
  22. // if this script url sniffing does not work try setting wwwroot explicitly
  23. // var wwwroot = "http://path/to/your/moodledir"
  24. // or copy the ASCIIMathML.js file into this file.
  25. var wwwroot = document.getElementsByTagName("script")[0].src.replace(/((.*?)\/lib\/.*)/,"$2");
  26. document.write('<script src="'+wwwroot+'/filter/asciimath/ASCIIMathML.js"></script>');