Some TeX equations are displayed, other do not work?!

Some TeX equations are displayed, other do not work?!

by Katharina Hoff -
Number of replies: 2

Hi!

I am very new to using Moodle, but I have been using LateX for many years.

I am using Moodle on the Server of our University, i.e. I do not have admin permissions. I have contacted our local admin about the issue that I am going to ask, but maybe he's on vacation... in any case, I am trying to prepare a course that will start soon, so it would be super helpful if I could get the TeX code to work without the admin.

If I enter $$ f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt $$ (f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt in Dollar-operators), it works just fine, displays the equation, everything good. But if I try anything else, it never works. For example 

$$ f(x)=\frac{1}{x} $$ (f(x)=\frac{1}{x} in dollar operators) displays a broken image. $$ f(x)=\int_{-\infty}^x~3^{-t^2}dt $$ (f(x)=\int_{-\infty}^x~3^{-t^2}dt in dollar operators) also displays a broken image, etc.

Do you have any idea what could be the reason for this weird behavior?

Any help would be appreciated. I am aware of the possibility to create the equations externally and include them as gifs. It would just be so much nicer if I didn't have to go through that effort since I want to use lots of equations.

Katharina

Average of ratings: -
In reply to Katharina Hoff

Re: Some TeX equations are displayed, other do not work?!

by Mauno Korpelainen -

This sounds like a permission issue. Most likely

$$ f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt $$

was created to moodledata subfolder /filter/tex when that folder still had write permissions and your site admin changed the permissions to not allow writing to this folder anymore. Tex filter checks if the old image exists in folder and if it does not Tex filter tries to create a new one.

The other option is that your settings of php have changed and there might be some disabled functions in php that no more allow creating of new images or if your site is using local distribution of latex paths of executable binaries might have changed in upgrading of site (see administration menu and settings of tex filter if there are green ticks after the paths). You can set site  debugging to ALL in administration menu and click one of those broken images to get some more info about possible reason. If your version of moodle is 2.X you could also add MathJax script tags to additional HTML in site administration and use MathJax instead of Tex filter to get around this kind of problems - see https://moodle.org/mod/forum/discuss.php?d=193064

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

Re: Some TeX equations are displayed, other do not work?!

by Katharina Hoff -

Thank you! This post was very helpful.

Luckily, our admin returned to his office, today, and he changed the permissions for me.

It's working very well, now!