LaTeX in GetSimple disi Junior Member Posts: 10 Threads: 3 Joined: Jan 2011 2011-07-09, 23:22:09 (This post was last modified: 2011-07-09, 23:25:43 by joneskelark65.) I try to enable LaTeX in GetSimple as it is possible in many other cms. Currently there are two known methods: 1. create an image of the LaTeX code and implement it into the page 2. send a JavaScript to the client and it parses the LaTeX to symbols locally For the image version, there is mathTeX. You can use a simple POST method to get an image from their website: Code:Now in the GetSimple editor every \ is replaced, so I have to use escape characters to parse the correct LaTeX code to their site. This looks then somewhat like this: http://www.disi.me/index.php?id=latex-test As you can see the second equation was parsed without escape characters and should show the same as the third. I cannot get the JavaScript method to work using MathJax. If I put the needed script into the header of a template, it removes everything and I get the error that en empty page cannot be saved. This would be the code in the header: Code: What I would want is either method (preferred the image solution), to detect LaTeX code if I put it between $$. I am willing to investigate this and learn how the different php scripts play together to find where text is parsed into code and grap$$ to use my own snippen, but with your help that might be much faster Could someone give me a hint, where I should start? Carlos Posting Freak Posts: 3,350 Threads: 106 Joined: Mar 2010 2011-07-10, 00:49:53 (This post was last modified: 2011-07-10, 00:56:02 by fotothink.) disi Wrote:Now in the GetSimple editor every \ is replaced, Your server has php 5.3.x and/or magic quotes disabled. GS 2.0x had this issue, but it was fixed in 3.0 (Your site is 2.03) News Manager (updated) 3.6, customizable blog plugin / Complementary plugins disi Junior Member Posts: 10 Threads: 3 Joined: Jan 2011 2011-07-10, 02:02:35 Carlos Wrote:disi Wrote:Now in the GetSimple editor every \ is replaced, Your server has php 5.3.x and/or magic quotes disabled. GS 2.0x had this issue, but it was fixed in 3.0 (Your site is 2.03) I upgraded to 3.0 and can now simple put in the backslash without escape character, thanks. Still looking through, how I might tripper a script to replace everything between $$and$$... mvlcek Posting Freak Posts: 2,062 Threads: 54 Joined: Jan 2011 2011-07-10, 04:02:19 (This post was last modified: 2013-01-06, 02:47:08 by mvlcek.) disi Wrote:Still looking through, how I might tripper a script to replace everything between $$and$$... You don't need a script to replace anything, if you are using the Javascript version. However, I played around a bit with both methods of getting nice math formulas and whipped up the attached small plugin. Just change the variable at the top to use one of the methods: $math_mode = 1: Images$math_mode = 2: Javascript $math_mode = 3: Javascript, but if Javascript is switched off, images are shown. In any case you enter formulas between $$...$$. I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites. disi Junior Member Posts: 10 Threads: 3 Joined: Jan 2011 2011-07-10, 04:13:23 (This post was last modified: 2011-07-10, 04:14:11 by joneskelark65.) mvlcek Wrote:disi Wrote:Still looking through, how I might tripper a script to replace everything between $$and$$... You don't need a script to replace anything, if you are using the Javascript version. However, I played around a bit with both methods of getting nice math formulas and whipped up the attached small plugin. Just change the variable at the top to use one of the methods:$math_mode = 1: Images $math_mode = 2: Javascript$math_mode = 3: Javascript, but if Javascript is switched off, images are shown. In any case you enter formulas between $$...$$. Thanks mvlcek, that works great. I could get MathJax to work if I set it to 2 and mathTeX if I set it to 1 but 3 doesn't work, which is no problem. mvlcek Posting Freak Posts: 2,062 Threads: 54 Joined: Jan 2011 2011-07-10, 04:34:34 disi Wrote:I could get MathJax to work if I set it to 2 and mathTeX if I set it to 1 but 3 doesn't work, which is no problem. Forgot to mention: you need to include jQuery in your template for option 3 to work. I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites. leestwise Junior Member Posts: 16 Threads: 2 Joined: Jan 2013 2013-01-24, 02:37:13 (This post was last modified: 2013-01-24, 03:04:20 by leestwise.) This is pretty cool! It took me awhile to get it to work, however. To use Forkosh's mathtex.cgi, the link in the plug-in needs to be changed by omitting "dreamhost.". If my hosting server supports the requisite LaTEX and dvipng software, I will be downloading mathtex.cgi to my site so I don't need to depend on another site. ...lee Though I suppose it can be expected that anyone wishing to use this plug-in should know the TEX format for math formulas, the merely curious will not be able to tell from the example in the plug-in's description whether they would like to learn. The example will not work as it stands. It should be Code:$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$ I'm sure the example code on the GS site was mangled by the posting software; but, it would be really nice for a prospective user to be able to block, copy and paste it into a web page to see how it looks. ...lee shawn_a Lead Developer Posts: 6,145 Threads: 178 Joined: Sep 2011 2013-01-24, 03:16:35 I was going to make a plugin out of this. http://www.xm1math.net/phpmathpublisher/ But I never did. This might be better off combined into n00dles shortcode plugin. Also there are alot more solutions now. mathml http://www.mathjax.org/ etc NEW: SA Admin Toolbar Plugin | View All My Plugins - Shawn A aka Tablatronix mvlcek Posting Freak Posts: 2,062 Threads: 54 Joined: Jan 2011 2013-10-30, 16:29:12 (2013-10-30, 11:13:56)peleus Wrote: Quote:I was going to make a plugin out of this. http://www.xm1math.net/phpmathpublisher/ But I never did. Hi. Any chance that this plugin could be developed maybe next year? I'd love to see this. There is already a plugin for formulas here. I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites. vginer Junior Member Posts: 12 Threads: 1 Joined: Dec 2013 2013-12-12, 07:14:36 By the way, is there a way to show inline equations? In LaTeX normally it is done by using $...$, but I don't know how to do it with this plugin, if possible. -- vicent mvlcek Posting Freak Posts: 2,062 Threads: 54 Joined: Jan 2011 2013-12-12, 07:31:23 (2013-12-12, 07:14:36)vginer Wrote: By the way, is there a way to show inline equations? In LaTeX normally it is done by using $...$, but I don't know how to do it with this plugin, if possible. Add a rule to your CSS: Code:.MathJax_Display { display: inline; }Then everything should be displayed inline. You can of course still put the formula into a separate paragraph. I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites. bigthanks Junior Member Posts: 18 Threads: 3 Joined: Oct 2015 2017-05-14, 21:13:19 Is there any effect with this news? https://www.mathjax.org/cdn-shutting-down/ bigthanks Junior Member Posts: 18 Threads: 3 Joined: Oct 2015 2017-05-14, 21:16:14 just share the VisualMathEditor https://goo.gl/5KrfM0 mvlcek Posting Freak Posts: 2,062 Threads: 54 Joined: Jan 2011 2017-05-15, 03:50:38 (2017-05-14, 21:13:19)bigthanks Wrote: Is there any effect with this news? https://www.mathjax.org/cdn-shutting-down/ New version with changed URLs for js and image fallback. I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites. « Next Oldest | Next Newest »