Plugin nebyl testován na 3 nejnovějších verzích WordPressu. Nemusí už být tedy podporován a u novějších verzí WordPressu může mít problémy s kompatibilitou a může být nestabilní.

MathJax-LaTeX

Popis

MathJax umožňuje vykreslovat vložené soubory LaTeX nebo MathML na stránkách HTML. Tento plugin přidává tuto funkci do systému WordPress. JavaScript MathJax se vstřikuje na vyžádání pouze do těch stránek, které to vyžadují. Tím je zajištěno, že MathJax není načítán pro všechny stránky, což by jinak zpomalilo načítání.

JavaScript MathJax může být doručen z vašeho vlastního serveru nebo můžete použít distribuční síť obsahu (CDN) Cloudflare, což je preferovaný mechanismus, protože nabízí vyšší rychlost a stabilitu než hostování JavaScriptu a vlastní konfigurace knihovny.

Latex můžete vložit pomocí různých syntaxí. Upřednostňována je syntaxe shortcode (https://codex.wordpress.org/Shortcode_API). Takže [latex]E=mc^2[/latex] bude fungovat ihned. To si také vynutí načtení MathJax.

Navíc můžete použít nativní syntaxi MathJax — $$E=mc^2$$ nebo \(E=mc^2\). Pokud je však tato syntaxe jedinou použitou syntaxí, musí být zásuvnému modulu výslovně řečeno, aby načetl MathJax pro aktuální stránku. Toho lze dosáhnout přidáním zkratky [mathjax] kdekoli v příspěvku. U příspěvků se syntaxí [latex]x[/latex] a $$x$$ to není nutné.

Můžete použít syntaxi wp-latex, $latex E=mc^2$. Parametry lze zadat stejně jako u wp-latex, ale budou ignorovány. To znamená, že MathJax-LaTeX by měl být vnořenou náhradou za wp-latex. Protože je to v rozporu s wp-latexem, je toto chování blokováno, pokud je přítomen wp-latex, a musí být explicitně povoleno v nastavení.

Můžete také zadat [nomathjax] — tím se na aktuální stránce zablokuje mathjax bez ohledu na ostatní značky.

MathJax-LaTeX je vyvíjen na GitHubu.

Autorské právo

Tentoplugin je chráněn autorskými právy Phillipa Lorda z Newcastle University a je licencován pod licencí GPLv2.

Instalace

  1. Rozbalte stažený archiv .zip do adresáře /wp-content/plugins/.
  2. Aktivujte plugin přes menu „Pluginy“ v administraci WordPressu.

Recenze

6. 10. 2020
There is a mistake on the beginning of this product descriotion: There, we see: "enables enables"
12. 2. 2018 1 odpověď
I think it's a very great plugin because we, as a physics lover, are so difficult to type latex equations in any blog. I like wordpress but its WP-latex is not good enough. I found that MathJax won't work well when the equation is too many "A_{1}^{2}", "\text{1233}" or something like that. For example, $$\large\sum_{i=1}^n\vec{F}_{\text{ext, i}}=\sum_{i=1}^n$$ This equation won't show LaTeX correctly. However, if I delete =\sum_{i=1}^n, then everything is fine. $$\large\sum_{i=1}^n\vec{F}_{\text{ext, i}}$$ I really need your help. I love this plugin so much because it enables me to write a physics blog. Thank you so much. You can see this two pictures : https://imgur.com/Myse5vr https://imgur.com/a/IxXI7
10. 12. 2017
Thanks for your work. By the way, could you please add the inlineMath config? Or I have to add <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} }); </script> in header.php to support the inlineMath.
8. 9. 2017
I really like the fact that it only injected code when needed. It seems I cannot put two [latex] equations on one page. I ended up use one [latex] and one $$ code.
28. 3. 2017
I am not a heavy LaTeX user but I do write about mathematics every now and then, and I find MathJax extremely useful. I have been using it for the last 2 or 3 years - no issues whatsoever. It simply works, both on PC an on mobile. The biggest selling point to me is that it allows for selecting & copying math expressions as text (as opposite to other LaTeX plugins that convert expressions to png). This makes things scalable, performant etc. Good work!
3. 9. 2016
Up to now I've been using the Simple Mathjax plugin, which also works well, but is not able to inject the mathjax dependency selectively. On my sites I have math only on a very few pages, and MathJax-LaTeX enables me to enable mathjax only on those pages by just adding the [mathjax] shortcode somewhere. Importantly, remember to disable Jetpack Beautiful Math, else it can interfere with MathJax-LaTeX. (at the time of writing, Jetpack is still turning math into bitmaps, which is not nearly as beautiful as MathJax on capable browsers). See https://vxlabs.com/2014/06/16/level-sets-the-practical-10-minute-introduction/ for an example.
Přečtěte si všech 9 recenzí

Autoři

MathJax-LaTeX je otevřený software. Následující lidé přispěli k vývoji tohoto pluginu.

Spolupracovníci

Přehled změn

1.3.12

  1. Use version 2.7.9 of MathJax JS
  2. Add code comments to all variables, functions and parameters.

1.3.11

  1. Use version 2.7.5 of MathJax JS

1.3.10

  1. Rename class files, per PHPCS
  2. Gracefully handle null values in filter_br_tags_on_math. Thanks to Yang Liu.

1.3.9

  1. Code style changes, per PHPCS 3.3.0 and WPCS 0.14.1
  2. Use PHP 7 short array syntax

1.3.8

  1. Code style changes, per PHPCS 3.1.1 and WPCS 0.14

1.3.7

  1. Update MathJax to 2.7.2

1.3.6

  1. Update location of MathJax CDN

1.3.5

  1. Add support for MathJax config via filter

1.3.4

  1. PHP code cleanup
  2. Always use https URL for MathJax library
  3. Updated „tested up to“ to 4.3

1.3.3

  1. Fixed inconsistent version numbers between readme and php file

1.3.2

  1. Further code clean ups.

1.3.1

  1. Accessibility Improvements for Admin page
  2. VIP Coding Standards
  3. MathML tags enabled in TinyMCE

All code for this release was submitted by users of
this plugin! Thanks to Jared Wenerd and Paul Schreiber.

1.3.0

  1. Whitelist MathML tags and attributes.
  2. Sanitization of input and escaping of output.

1.2.1

  1. Bug fix: custom location was not correctly applied.
  2. Bug fix: force load was not correctly applied.

1.2

  1. Admin page was open to attack from third party sites which user was logged
    in as admin.
  2. The admin page has been isolated and rewritten.
  3. All the options have been renamed, which will, unfortunately mean
    reconfiguring the plugin. In particular, wp-latex syntax is switched off by
    default.

1.1

  1. Documentation update
  2. Update test-with documentation for WordPress 3.5.1
  3. Tested against MathJax2.1

1.0

  1. Compatibility with MathJax 1.1. Load a default configuration from the MathJax distribution.
  2. Use the MathJax Content Distribution Network to deliver the javascript library. Offers improved performance and stability.

0.2

  1. MathJax.js can be loaded form a configurable URL. Defaults to $PLUGIN/MathJax/MathJax.js