I would like to try it but do not know which files have to be modified.
I will post a detailed explanation as soon as I find time to write it !
Comments and suggestions welcome
A short note : the standard Moodle distribution already includes a tex filter, which is based on mimeTeX. However, mimeTeX only supports a subset of latex, i.e. mathematical formulas. LatexRender on the other hand, is capable of rendering (almost) any latex.
It falls back to mimetex if it doesn't work for any reason too.
I don't see latexrender in HEAD and in contrib...
Where is it?
I did some changes in latexrender for better internationalization and I'm going to merge it in your new version of filter.
You should see the file latex.php in the text filter directory.
I'll try to merge my changes to this file...
I have had LOTS of problems - still not working. When can I see your code?
Ok - I have latex working with Windows XP. Again the paths are hard coded. The main issue is getting all the right software on the Windows machine. This is what you need.
- Latex. I used MikTex ( http://www.miktex.org/ ). The 'basic' install is fine and I installed using the defaults.
- ImageMagick. I used the Static 16 bit per pix build from http://www.imagemagick.org/script/index.php. Note that I changed the installation path to c:\ImageMagick as PHP seemed to choke on the space in 'Program Files'.
- Ghostscript from http://www.cs.wisc.edu/~ghost/. Again the standard Windows install does the job.
The revised latex.php code is now in 1.6dev CVS. Let me know if anybody actually gets it to work
Note: ImageMagick will may be 8bit.
I'm not entirely sure what you mean. If you are running 1.6dev then it should work. Please note that it is only tested on Linux and requires Latex and ImageMagick binaries to be installed. The paths are hard coded in latex.php which is a bit of a restriction. The latex version is called first - if it fails, mimetex is used. That's it!
I am currently banging my head against a wall trying to get it to work with Windows.
I also have a plan to improve upon the hard coded paths. I am going to 'improve' the filters admin screen to permit setup pages (like Modules and Blocks) so the administrator can adapt the paths to the binaries. At the moment you need to hack the code.
Does this help?
Just for further info, on Linux you need the following binaries in place...
...if they exists, then it should work. It should be easy to extend to other Unix platforms, but the check for PHP_OS in the code would need extended for the appropriate OS
I am going to 'improve' the filters admin screen to permit setup pages (like Modules and Blocks) so the administrator can adapt the paths to the binaries.
This is a good idea!
I assigned my bug 3557 to you...