|
Cookbook /
MathJaxSummary: Add markup to embed math using TeX syntax.
Version: 20110307
Prerequisites:
Status: Stable
Maintainer: AMyles
Questions answered by this recipe
DescriptionEmbed math in wiki pages using scalable fonts. NotesDisable the jsMath plugin (if you are already using it) before using the MathJax plugin below.
Additional MathJax settingsThe MathJax settings file Release notes
See also
ContributorsCommentsYou can include the parameters necessary to change the settings using MathJax without changing the file $HTMLHeaderFmt['MathJax'] = '<script type="text/javascript" src="$MathJaxUrl/MathJax.js"></script>'; to
$HTMLHeaderFmt['MathJax'] = '<script type="text/javascript" src="$MathJaxUrl/MathJax.js">MathJax.Hub.Config({
extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: { inlineMath: [ [\'{\$\',\'\$}\'] ], displayMath: [ [\'{\$\$\',\'\$\$}\'] ] } });</script>';
in your cookbook. Domingo Redal November 29, 2010, at 08:21 AM Thank you, Domingo! I have updated the script and documentation taking your suggestions into account. AMyles 2010-12-18
David C. October 1st, 2011, at 15:56 You can simplify the installation and updates refering directly in the MathJax.php file to https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML rather than to a local installation of MathJax. It works fine for me.
So replace
SDV($MathJaxUrl, "$PubDirUrl/MathJax");
with
SDV($MathJaxUrl, "https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML");
SDV() means "Set default value (if none is set)" and its purpose is to allow you to set your own values without editing the script. You shouldn't ever need to modify files from the PmWiki core distribution or recipes, because they allow you to set your own variables. In config.php, before including the cookbook/RECIPE.php file, add something like: User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |