Can't see any tex images

Can't see any tex images

by Marcelo Azuaga -
Number of replies: 4

Hi,

   I'm new in this community, and i would like to know how i can solve my problem in a fresh installation of Moodle 2.2, regarding tex expressions.

I can't see any images of my tex code, and debugging shows the following,

Checking executables
Error: latex executable (/cuarto/filter/latex) is not readable
Error: dvips executable (/usr/bin/dvips) is not readable
Error: convert executable (/usr/bin/convert) is not readable

base filename for expression is '9608176195573c30c6beb3cf078fdf66'

Processing TeX expression:

f(x)=\int_{-\infty}^x~e^{-t^2}dt
$ /cuarto/filter/latex --interaction=nonstopmode /home/norbcap/public_html/cuarto/uploaddata/temp/latex/9608176195573c30c6beb3cf078fdf66.tex
OUTPUT:
RETURN CODE: 127

$ /usr/bin/dvips -E /home/norbcap/public_html/cuarto/uploaddata/temp/latex/9608176195573c30c6beb3cf078fdf66.dvi -o /home/norbcap/public_html/cuarto/uploaddata/temp/latex/9608176195573c30c6beb3cf078fdf66.ps
OUTPUT:
RETURN CODE: 127

$ /usr/bin/convert -density 240 -trim /home/norbcap/public_html/cuarto/uploaddata/temp/latex/9608176195573c30c6beb3cf078fdf66.ps /home/norbcap/public_html/cuarto/uploaddata/temp/latex/9608176195573c30c6beb3cf078fdf66.gif
OUTPUT:
RETURN CODE: 127


Notice: Undefined variable: status in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 152

Warning: system() has been disabled for security reasons in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 152

Warning: shell_exec() has been disabled for security reasons in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 163


Notice: Undefined variable: status in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 164
The shell command
"/home/norbcap/public_html/cuarto/filter/tex/mimetex.linux" -e "/home/norbcap/public_html/cuarto/uploaddata/filter/tex/9608176195573c30c6beb3cf078fdf66.gif" -- '\Large f(x)=\int_{-\infty}^x~e^{-t^2}dt'
returned status =

Notice: Undefined variable: status in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 165

Notice: Undefined variable: status in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 167

Notice: Undefined variable: status in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 169
File size of mimetex executable /home/norbcap/public_html/cuarto/filter/tex/mimetex.linux is 830675
The file permissions are: 100777
The md5 checksum of the file is 56bcc40de905ce92ebd7b083c76e019e
Image not found!
Warning: Cannot modify header information - headers already sent by (output started at /home/norbcap/public_html/cuarto/filter/tex/texdebug.php:152) in /home/norbcap/public_html/cuarto/filter/tex/texdebug.php on line 121

No text output available

 ¿Any ideas of how can I solve this? Thanks in advance,

Marcelo

 

Average of ratings: -
In reply to Marcelo Azuaga

Re: Can't see any tex images

by Mauno Korpelainen -

This has been asked many times and since your host has disabled some functions of php - system(), shell_exec(),... - you most likely can't enable these functions of php yourself and can't use tex filter, not with mimetex or local distribution of latex (binaries are not readable, they may not even exist)

I created a new post for such cases - http://moodle.org/mod/forum/discuss.php?d=193064

In reply to Mauno Korpelainen

Re: Can't see any tex images

by Marcelo Azuaga -

Thanks Mauno for your advice.

I'm still confused because i've installed one of your fantastic packs mpluga, and when i use Googletex it works fine showing correctly the maths images, but with Dragmath, and the others it doesn't work at all.

Is this consistent with what you told me in the other message? Or can I try other solutions?

Thanks in advance,

Marcelo

In reply to Marcelo Azuaga

Re: Can't see any tex images

by Mauno Korpelainen -

http://moodle.org/mod/forum/discuss.php?d=193064

and

http://moodle.org/mod/forum/discuss.php?d=182627

are using totally different configurations and should not be mixed.

In http://moodle.org/mod/forum/discuss.php?d=193064 I explained a method to use cdn mathjax without tex filter but with dragmath so that you don't need to load any extra files, just give the necessary script tags to additional HTML and edit the editor lib file to let your site use dragmath plugin also when tex filter is disabled - in that case mathjax renders all maths inside double dollar delimiters. You could use also local mathjax the same way. It should be really simple to set up.


On the other hand http://moodle.org/mod/forum/discuss.php?d=182627 was originally a theme based plugin package, an optional expanded editor version of tinymce (called tinymath) with some extra math plugins, filters and many settings (of math filter and tinymath editor) that can be used with additional HTML as well but obviously the changes I have made to original package during the past months have caused some confusion about correct settings. If you want to test mpluga package the best way to start is to remove additional HTML, select mathstandard theme, enable jsxgraph filter and select local Mathjax files and local asciimath extension from settings of math filter. But like I have said in that post it's an experimental package and not fully tested. One known problem is for example that dragmath is using by default double dollars and if tex filter is enabled everything between double dollars will be coverted to tex images by tex filter, no matter if it works or not. So if you want to use mathjax you can either use different delimiters for mathjax (given in configuration of mathjax) or disable tex filter. Mixing different configurations can cause unexpected results - tinymath plugins are ment to be used with math filter, jsxgraph filter and other parts of plugin package and addititional HTML should use the same settings or some parts of package may not work anymore...

Some people are also confused when dragmath and some other plugins give only latex code (within delimiters) in editor content area - that's exactly how they should work - mathjax is rendering maths only on pages and in preview mode of editor plugins if settings are correct - just like tex filter renders images only on pages, never in editor content area. Google chart api tex plugin is using pure images all the time so you really see the images also in editor content area.

I think the best way to make things clearer is to split all parts of large math plugins package to smaller pieces again so that it is possible to install only one plugin or one filter...next year. For now the simplest option is to use math plugins only on test sites.

Using plain (cdn or local) mathjax with dragmath like I explained in http://moodle.org/mod/forum/discuss.php?d=193064 should be easy both on production sites and test sites as an optional renderer to tex filter, in both cases dragmath gives you code and either tex filter or mathjax renders the latex on pages (or for example mathtran if you use mathtran filter instead of tex filter).

You can also try commercial Wiris - it is included to math plugins (but disabled by default in settings of math filter) or you can use Wiris plugin with core tinymce like explained on Wiris site. Or you can enable Fmath plugin that renders images to moodledata subfolder using flash (still a little buggy and therefore disabled by default).

I really posted http://moodle.org/mod/forum/discuss.php?d=193064 mainly to give people a very simple way to use maths with minimal changes to settings or files - no extra plugins, just a few lines of code and it should work - non related to the other discussion about more complex and experimental math plugins...

During the past months I have actually noticed that the more I try to make things simpler and easier to install the more people get confused and try to mix all the packages from the past. Marc G used to remind me to keep things simple in the past - the KISS principle - but I have obviously managed to mix Marc too with all the recent changes smile smile

So it's time to repack once again all the plugins and configuration examples in January and drop some unnecessary code from the past to make all moodle maths consistant on all environments.

HTH,

Mauno

Average of ratings: Useful (1)
In reply to Mauno Korpelainen

Re: Can't see any tex images

by Marcelo Azuaga -

Thank you Mauno, very much indeed!!!

You gived me very useful information, to understand how these plugins work.  I managed to edit php.ini and plugins are working better now.

Marcelo