Skip to content

Commit

Permalink
Merge pull request #24 from paulschreiber/mathjax272
Browse files Browse the repository at this point in the history
Update to MathJax 2.7.2
  • Loading branch information
paulschreiber authored Sep 18, 2017
2 parents 0d51513 + 5588342 commit dfa7407
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 43 deletions.
2 changes: 1 addition & 1 deletion mathjax-latex.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static function add_script() {

// initialise option for existing MathJax-LaTeX users
if ( get_option( 'kblog_mathjax_use_cdn' ) || ! get_option( 'kblog_mathjax_custom_location' ) ) {
$mathjax_location = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
$mathjax_location = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js';
} else {
$mathjax_location = get_option( 'kblog_mathjax_custom_location' );
}
Expand Down
62 changes: 20 additions & 42 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,27 @@
Contributors: philliplord, sjcockell, knowledgeblog, d_swan, paulschreiber, jwenerd
Tags: mathematics, math, latex, mathml, mathjax, science, res-comms, scholar, academic
Requires at least: 3.0
Tested up to: 4.7.3
Stable tag: 1.3.6
License: GPLv3
Tested up to: 4.8.1
Stable tag: 1.3.7
Requires PHP: 5.4.0
License: GPLv2

This plugin enables mathjax (http://www.mathjax.org) functionality for
WordPress (http://www.wordpress.org).

== Description ==

Mathjax enables enables rendering of embedded latex or mathml in HTML pages.
This plugin adds this functionality to wordpress. The mathjax javascript is
inject on-demand only to those pages which require it. This ensures that
mathjax is not loaded for all pages, which will otherwise slow loading down.

The MathJax javascript can be delivered from your own server, or you can
utilise the [MathJax Content Distribution Network (CDN)]
(http://www.mathjax.org/docs/latest/start.html#mathjax-cdn), which is the preferred
mechanism as it offers increased speed and stability over hosting the Javascript
and configuring the library yourself. Use of the CDN is governed by these
[Terms of Service](http://www.mathjax.org/download/mathjax-cdn-terms-of-service/).

You may embed latex using a variety of different syntaxes. The shortcode
(http://codex.wordpress.org/Shortcode_API) syntax is preferred. So
[latex]E=mc^2[/latex] will work out of the box. This also forces loading of
mathjax.

Additionally, you can use native mathjax syntax -- $$E=mc^2$$ or \(E=mc^2\).
However, if this is the only syntax used, the plugin must be explicitly told
to load mathjax for the current page. This can be achieved by adding a
[mathjax] shortcode anywhere in the post. For posts with both [latex]x[/latex]
and $$x$$ syntaxes this is unnecessary.

You can use wp-latex syntax, $latex E=mc^2$. Parameters can be
specified as with wp-latex but will be ignored. This means that mathjax-latex
should be a drop in replacement for wp-latex. Because this conflicts with
wp-latex, this behaviour is blocked when wp-latex is present, and must be
explicitly enabled in the settings.

You can also specify [nomathjax] -- this will block mathjax on the
current page, regardless of other tags.
Mathjax enables enables rendering of embedded latex or mathml in HTML pages. This plugin adds this functionality to wordpress. The mathjax javascript is inject on-demand only to those pages which require it. This ensures that mathjax is not loaded for all pages, which will otherwise slow loading down.

The MathJax javascript can be delivered from your own server, or you can use the [CloudFlare Content Distribution Network (CDN)] (https://www.mathjax.org/cdn-shutting-down/), which is the preferred mechanism as it offers increased speed and stability over hosting the Javascript and configuring the library yourself.

You may embed latex using a variety of different syntaxes. The shortcode (http://codex.wordpress.org/Shortcode_API) syntax is preferred. So [latex]E=mc^2[/latex] will work out of the box. This also forces loading of mathjax.

Additionally, you can use native mathjax syntax -- $$E=mc^2$$ or \(E=mc^2\). However, if this is the only syntax used, the plugin must be explicitly told to load mathjax for the current page. This can be achieved by adding a [mathjax] shortcode anywhere in the post. For posts with both [latex]x[/latex] and $$x$$ syntaxes this is unnecessary.

You can use wp-latex syntax, $latex E=mc^2$. Parameters can be specified as with wp-latex but will be ignored. This means that mathjax-latex should be a drop in replacement for wp-latex. Because this conflicts with wp-latex, this behaviour is blocked when wp-latex is present, and must be explicitly enabled in the settings.

You can also specify [nomathjax] -- this will block mathjax on the current page, regardless of other tags.

MathJax-LaTeX is developed on
[Github](https://github.com/phillord/mathjax-latex).
Expand All @@ -51,15 +32,13 @@ MathJax-LaTeX is developed on

1. Unzip the downloaded .zip archive to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. This uses the mathjax
CDN(<http://www.mathjax.org/docs/1.1/start.html#mathjax-cdn>). Alternatively:
1. Download the MathJax Javascript library (http://www.mathjax.org /download/)
1. Place the Javascript library in the mathjax-latex directory (`/wp-content/plugins/mathjax-latex/MathJax`)
1. You can configure the plugin to load MathJax from a different URL to the default. See the options page.


== Changelog ==

= 1.3.7 =

1. Update MathJax to 2.7.2

= 1.3.6 =

1. Update location of MathJax CDN
Expand Down Expand Up @@ -148,5 +127,4 @@ CDN for javascript delivery. Upgrading is strongly recommended.

== Copyright ==

This plugin is copyright Phillip Lord, Newcastle University and is licensed
under GPLv2.
This plugin is copyright Phillip Lord, Newcastle University and is licensed under GPLv2.

0 comments on commit dfa7407

Please sign in to comment.