MathJax

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

MathJax

Post by Maxim » Fri Aug 21, 2015 9:22 am

Prompt how to connect MathJax ( https://www.mathjax.org/ )?
Подскажите, как подключить MathJax ( https://www.mathjax.org/ )?

cmb
Posts: 13230
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: MathJax

Post by cmb » Fri Aug 21, 2015 11:52 pm

Maxim wrote:Подскажите, как подключить MathJax ( https://www.mathjax.org/ )?
Good question! :)

In the simplest case you have to insert the following into the <head> section of template.htm:

Code: Select all

<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Then you can write some "MathJax" on a page, e.g.

Code: Select all

There are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
Christoph M. Becker – Plugins for CMSimple_XH

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Куда лучше разархивировать "MathJax-master"?

Post by Maxim » Sun Aug 23, 2015 4:30 am

Where better to unarchive "MathJax-master.zip" https://github.com/mathjax/MathJax/archive/master.zip ?
Куда лучше разархивировать "MathJax-master.zip" https://github.com/mathjax/MathJax/archive/master.zip ?

/
/core
/plugins
/plugins/tinymce
/templates/name-templates
...

cmb
Posts: 13230
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: MathJax

Post by cmb » Sun Aug 23, 2015 12:37 pm

Maxim wrote:Куда лучше разархивировать "MathJax-master.zip" https://github.com/mathjax/MathJax/archive/master.zip ?
You can put the content of master.zip into a new folder MathJax/ in the installation folder:

Code: Select all

MathJax/
cmsimple/
core/
...
Then use the following in template.htm:

Code: Select all

<script type="text/javascript"
  src="<?php echo $pth['folder']['base']?>MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Christoph M. Becker – Plugins for CMSimple_XH

Maxim
Posts: 121
Joined: Thu Jun 13, 2013 6:52 am
Location: Запорожье
Contact:

Спасибо, Кристоф!!!

Post by Maxim » Tue Aug 25, 2015 8:57 am

Thank You, Christoph!!!
Спасибо, Кристоф!!!

Post Reply