## General help

### Tex Formulas do not appear

Tex Formulas do not appear

In my quizzes I tried to wrtie mathematical TEX Formulas. So I wrote e.g.:

dollar dollar sqrt(x)+x^2 dollar dollar ($$sqrt(x)+x^2$$)

But the formula does appear as a missing link (see attachment). I read in the documentation, one has to allow the browser to run binaries. But how? Or did a make another mistake?

Moodle 1.8, Debian Linux 4.0, Apache 2.x

Average of ratings: -
Re: Tex Formulas do not appear

Can anyone help?

Average of ratings: -
Re: Tex Formulas do not appear
Stefan,

Are you using the latex binaries supplied by your OS or the default mimetex binary that Moodle reverts to in case it can't find the OS versions?

Another thing to check would be that you've got slash_arguments configured correctly.

Visit the following page to debug your tex filter: http://yourhost.com/moodle/filter/tex/texdebug.php

Paul

Average of ratings: -
Re: Tex Formulas do not appear

show image results in:

sh: /var/www/moodlecogitosumnet/filter/tex/mimetex.linux: Permission denied
The shell command
"/var/www/moodlecogitosumnet/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" '\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt'
returned status = 126
File size of mimetex executable /var/www/moodlecogitosumnet/filter/tex/mimetex.linux is 491043
The file permissions are: 100644
The md5 checksum of the file is c294ab11905323bb5cb0f451241bedc1

If I check slash arguments I get : (see attachment)

Average of ratings: -
Re: Tex Formulas do not appear
It would appear that execute permissions haven't been granted on the mimetex.linux file, to do this through a terminal session cd to the /filter/tex folder in your Moodle installation and issue the following command:

chmod +x mimetex.linux

You should probably check that apache owns the file too, so issue the following:

chown apache mimetex.linux

Average of ratings: -
Re: Tex Formulas do not appear

I did the two changes. Now the rights should be OK. For the owner I have not apache, so I used www-data. But I'm not sure, if it's the correct user.

It does not work. The pictures are not found and the errors in the texdebug are the same. Do I have to restart anything?

Average of ratings: -
Re: Tex Formulas do not appear

I just checked the settings. Maybe I do not use mimetex??? What do I have to install on my debian etch server?

Average of ratings: -
Re: Tex Formulas do not appear
What is displayed in the texdebug page now that you've granted execute permissions on mimetex.linux ?

If you want to use a different TeX filter you can install the following packages (if they don't already exist) on your server:
• tetex-latex
• tetex-dvips
• ImageMagick

Average of ratings: -
Re: Tex Formulas do not appear

Yes, I granted execute permissions on mimetex.linux. But the formulas don't appear yet.

Average of ratings: -
Re: Tex Formulas do not appear

Which latex is better? Shouldn't work mimetex without any modification or installation?

Average of ratings: -
Re: Tex Formulas do not appear

apt-get install tetex-latex did not find a package. Should I use tetex-base?

debian etch

Average of ratings: -
Re: Tex Formulas do not appear

I had the same problem with formulas.
I solved it on debian etch with:

# apt-get install texlive mimetex
# mv /var/www/moodle/filter/tex/mimetex.linux \ /var/www/moodle/filter/tex/mimetex.linux.old
# ln -s /usr/bin/mimetex \
/var/www/moodle/filter/tex/mimetex.linux

Average of ratings:Useful (1)
Re: Tex Formulas do not appear

It works! Thanks!

Should a put on a bug report?

(I do not understand, why we have to install texlive. Isn't this a simular software like mimetex??)

Average of ratings: -
Re: Tex Formulas do not appear

I think is not a bug.

texlive is not necessary. I installed it just in case . You can remove it.

Average of ratings: -
Re: Tex Formulas do not appear

But that mimetex does not work seems to be a bug...

Average of ratings: -
Re: Tex Formulas do not appear

mimetex binary, which comes with moodle, is compiled for 32-bit architecture. Because my server have 64-bit architecture, looks like the problem comes from this point.

root@smvs:/var/www/moodle/filter/tex# file mimetex.linux.old
mimetex.linux.old: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

root@smvs:/var/www/moodle/filter/tex# file /usr/bin/mimetex
/usr/bin/mimetex: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), for GNU/Linux 2.6.0, stripped

So, this is not a bug.
The various versions of mimetex is included, so the developers can include the version for 64-bit linux also.

Average of ratings: -
Re: Tex Formulas do not appear
mimetex only has a limited understanding of TeX and it does not produce particularly nice graphics. The other way will render any TeX and looks nicer. Take your pick

If you have a platform for which a mimetex binary is not supplied, please post a bug. It would be even more helpful if you could supply the correct binary too.

Average of ratings: -