Latex renderer

Latex renderer

by Howard Miller -
Number of replies: 6
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I have added a small routine into the TeX filter. If possible it will attempt to render the graphic using Latex rather than the usual mimetex. This produces considerably higher quality output. If it doesn't work for any reason it will fall back to mimetex.

This depends on a number of items being installed on the server...

It currently only supports Linux (binary paths are assumed to be /usr/bin) and Mac (binary paths are assumed to be /sw/bin). The code could easily be adapted to support other platforms, but the binary paths are effectively hard coded so they would need to be added to the code.

I would appreciate if interested users could have a look and let me know if there are any problems.

(EDIT: This is in the 1.6dev / HEAD code by the way)

Average of ratings: -
In reply to Howard Miller

Re: Latex renderer

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Just a comment about your choice of the binary path on Mac OS X. You assume that the user has installed LaTeX through Fink.

A quick look on the OS X TeX mailing list shows that a lot of people (if not most of them) uses instead the excellent and simple to install distribution of Gerben Weirda (http://www.rna.nl/tex.html), whose binary path is rather "/usr/local/teTeX/bin/powerpc-apple-darwin-current".

It could be a big plus for your filter routine if you could add this option.

Anyway, thanks for your contribution smile
In reply to Nicolas Martignoni

Re: Latex renderer

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hi!

Thanks for the hint! I'll take a look at that. Yes, I installed using Fink - I didn't know about the other version, but I'll install it and incorporate it into the code.
In reply to Nicolas Martignoni

Re: Latex renderer

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Another point... the renderer also requires the 'convert' command from ImageMagick. Have you any thoughts on installers for that on OSX?
In reply to Howard Miller

Re: Latex renderer

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I actually wrote a separate LaTeX filter like this for emathpool.net but it never made it into the main code, so thanks for doing this, Howard.  Making it fall back cleanly to mimetex is a good and essential idea.
In reply to Martin Dougiamas

Re: Latex renderer

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This is what happens when all those Mac users moan about lack of anti-aliasing in mimetex smile