Tex Formulas do not appear

Tex Formulas do not appear

by Stefan Büchler -
Number of replies: 16

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: -
In reply to Stefan Büchler

Re: Tex Formulas do not appear

by Stefan Büchler -
Can anyone help?
In reply to Stefan Büchler

Re: Tex Formulas do not appear

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
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
In reply to Paul Holden

Re: Tex Formulas do not appear

by Stefan Büchler -

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
Image not found!

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

Attachment Slash.gif
In reply to Stefan Büchler

Re: Tex Formulas do not appear

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
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
In reply to Paul Holden

Re: Tex Formulas do not appear

by Stefan Büchler -

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?

Attachment mimetex.gif
In reply to Stefan Büchler

Re: Tex Formulas do not appear

by Stefan Büchler -
I just checked the settings. Maybe I do not use mimetex??? What do I have to install on my debian etch server?
Attachment Latex_Randering.gif
In reply to Stefan Büchler

Re: Tex Formulas do not appear

by Paul Holden -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
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
In reply to Paul Holden

Re: Tex Formulas do not appear

by Stefan Büchler -
Yes, I granted execute permissions on mimetex.linux. But the formulas don't appear yet.
In reply to Paul Holden

Re: Tex Formulas do not appear

by Stefan Büchler -

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

In reply to Paul Holden

Re: Tex Formulas do not appear

by Stefan Büchler -

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

debian etch

In reply to Stefan Büchler

Re: Tex Formulas do not appear

by A B -
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)
In reply to A B

Re: Tex Formulas do not appear

by Stefan Büchler -

It works! Thanks! breit grinsend

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??)

In reply to Stefan Büchler

Re: Tex Formulas do not appear

by A B -
I think is not a bug.

texlive is not necessary. I installed it just in case smile. You can remove it.
In reply to A B

Re: Tex Formulas do not appear

by Stefan Büchler -
But that mimetex does not work seems to be a bug...
In reply to Stefan Büchler

Re: Tex Formulas do not appear

by A B -
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.
In reply to Stefan Büchler

Re: Tex Formulas do not appear

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
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 smile

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.