render equations with html, tex or asciimathml

render equations with html, tex or asciimathml

ved gustavo rodriguez -
Antal besvarelser: 6
Hello,

Weeks ago I installed moodle on my own PC and, of course, I had lot of problems with Latex... but finally it worked... In the process I had to remove my linux installation and start the installation on windows, and install miktex, imagemagik and all the stuff... lot of time wasted by the way.

Now, I have installed moodle on a remote server and, like always, latex doesn`t work...
I know that my problem is with the server permissions. The comand system() and shell_exec() are blocked due security.

So I think that I have to render the equations using a different method and forget TEX.

Is it true that I can render the equations in three ways? html, tex or asciimathml? Wich is the best one? Wich is the software needed?

Thanks for your attenion and please excuse me poor english... lot of time since I don´t use it!

Gennemsnitsbedømmelse: -
I svar til gustavo rodriguez

Re: render equations with html, tex or asciimathml

ved Mauno Korpelainen -

Many schools and hosted sites have the same problem but it is possible to use external tex renderers like MathTran, cgi Mimetex or google chart api tex with filter or javascripts or for example asciimathml even if you site had no latex at all.

For example Mathtran has a good documentation in http://www.mathtran.org/wiki/index.php/Main_Page and it can be used either with filter http://moodle.org/mod/data/view.php?d=13&rid=916 or with javascript (theme)

One problem with javascripts is of course that they won't work if javascripts are disabled in browser - yet javascripts don't require any software or checking of permissions, executing of server side commands etc.

You can also use commercial tools like Wiris.

My main interest has been to develop new free open source tools and plugins for all such sites that can't use TeX locally and test plugins for editors have been working pretty well. They should be available before Christmas for all versions of moodle and both for HTMLArea and TinyMCE and all current main renderers - both for maths and graphs. The main problem with all renderers is that they all have some custom syntax that does not work the same way in other renderers - roots and matrices for example, spaces, colors, text sizes, custom symbols and so on.

I am also planning to write code for a math filter that could be used for rendering tex and asciimathml with most current local or external renderers even if javascript is disabled and editors are not available - during the coming weeks.

Check attached test.html as an example and test adding to your theme meta.php (or header.html) a simple tag like

<script type="text/javascript" src="http://korpelainen.net/js/AM.js"></script>

(copy the script to some folder on your site - it is possible that test site is not the same after some years anymore)

If you read other discussions from math forum it is also important to note that for example Wiki has problems with square brackets [ and ] and asciimathml does have conflicts with smiley code (emotions like : )  or  ( n ) ... but these can be changed either with theme config.php or site settings. That's one of the reasons why I have been using mostly a special Math theme where smileys are not used.

It's always so funny to see Nej or Ja in the middle of equations... smiler

For simple equations you can use plain html and unicode symbols but html has it's limits - but latex and asciimathml have some limitations too.

Example α β γ about simple html:

(a + b)3 = a3 + 3a2b + 3ab2 + b3

I svar til Mauno Korpelainen

Re: render equations with html, tex or asciimathml

ved gustavo rodriguez -
Thanks a lot Mauno, I am going to check mathtran and also your test file...

Again, thanks a lot and be sure that I will follow your work.
I svar til Mauno Korpelainen

Re: render equations with html, tex or asciimathml

ved gustavo rodriguez -
Mathtran works perfect!
I only installed it in the filter directory, desactivate Tex and activate Mathtran... and it works...
For my purpouses It is enought by the moment.
Thanks Mauno.

I svar til gustavo rodriguez

Re: render equations with html, tex or asciimathml

ved Ramon Eixarch -
(English translation in the bottom)

Apreciado Gustavo,

te doy más detalles de WIRIS una de las alternativas que Mauno apunta.

El editor de ecuaciones WIRIS se puede instalar fácilmente con un instalador automático. Más detalles www.wiris.com/moodle/

No sé si conoces la calculadora online WIRIS dsiponible en diversos portales educativos españoles. Se trata de una herramineta de la misma familia. www.wiris.com/demo/es/

Intentamos alcanzar acuerdos con la Consejerias de Educación para que las escuelas lo puedan usar sin coste.


Un saludo

ENGLISH VERSION
Dear Gustavo,

I give more details of the alternative WIRIS that Mauno points out.

WIRIS equation editor can be easily installed with an automatic installer. More details www.wiris.com/moodle/

You may know the online calculator WIRIS available from several Spanish educational portals. This is a tool of the same familiy www.wiris.com/demo/en/

We try to reach agreements with the Ministries of Education so that schools can use it without cost.

Best regards
I svar til Ramon Eixarch

Re: render equations with html, tex or asciimathml

ved gustavo rodriguez -
Hello Ramon, it is very interesting to have some "easy to install" software about latex in moodle and the remote servers...
I am going to check this software.

Thanks a lot. I hope to have a moodle platform running on a remote server wiht a good
equation viewer soon...

I svar til Ramon Eixarch

Re: render equations with html, tex or asciimathml

ved gustavo rodriguez -
The online calculator Wiris is amazing... you can create nice equations and also.... calculate them!
Very useful tool.