tex

tex

by Grace Corcoran -
Number of replies: 17
Hi,
Last year I wrote some quiz's using latex with some success.
For example the following text works fine

$$\frac{3s+20}{s^2-16}$$ I get the following output

The Inverse Laplace Transform of f4dc24be772aed78b1a16ffaf65a4a72.gif

But for some reason now if I edit it and run the program with the following piece of text $$\frac{s+20}{s^2-16}$$ I get  a box .
I also have installed TEXnicCEnter thinking that all I would have to do is write my questions here and paste them into Moodle with the $$ symbols around them. This does'nt work either.
What am I doing wrong please.
Also I never got the algebra filter to work at any stage.
Hope you can help
Grace Corcoran
  f946d58df06bcb76c478322ff2dad39c.gif


Average of ratings: -
In reply to Grace Corcoran

Re: tex

by John Forkosh -
I don't know about your "empty box" or "algebra filter" problems. Regarding texniccenter, I don't know the syntax it accepts, but mimetex requires that text be separated from math by an \mbox (or similar directive), e.g.,
$$$y=\left\{x/2\mbox{ if x even}\\(x+1)/2\mbox{ if odd}\right.$$$
renders
$$y=\left\{x/2\mbox{ if x even}\\(x+1)/2\mbox{ if odd}\right.$$

If you're still not sure what's happening, click http://www.forkosh.com/mimetex.html and try cutting-and-pasting an expression giving you trouble into the box a few screens down. If it renders okay there, then you have a tex filter problem which Zig can address. If it doesn't render okay there, then it's a question for me -- please post your exact expression that's not rendering properly.
In reply to John Forkosh

Re: tex

by Bhupinder Singh -

Hi John,

I was looking for help and advice from you regarding Filter in Moodle.

Can you advsie where I can get more reading material to understand the usage of these filters(Math and algebra).

Thanks for your help.

Garry

In reply to Grace Corcoran

Re: tex

by Zbigniew Fiedorowicz -
The tex debugger on your server gives the following error:

sh: line 1: /www/itsligo/filter/tex/mimetex.linux: No such file or directory
The shell command
"/www/itsligo/filter/tex/mimetex.linux" -e "/www/moodledata/itsligo_data/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" '\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt'
returned status = 127
File size of mimetex executable /www/itsligo/filter/tex/mimetex.linux is 429514
The file permissions are: 100755
The md5 checksum of the file is e14b7159b8738a60e7909226e8edc5ce
Image not found!

This looks strange, since the first error message indicates that the mimetex.linux program /www/itsligo/filter/tex/mimetex.linux couldn't be found.  On the other hand the debugger did find the exact same file and determined its size and md5 checksum.

The only explanation I can think of is that your provider has set up PHP on your server so that it can only execute programs in certain predesignated directories, presumably for security reasons.  This would also explain why your algebra filter doesn't work.

In reply to Zbigniew Fiedorowicz

Re: tex

by Grace Corcoran -
Tex filter is now working. It was a server problem. Thanks for the help. I will most likely be back again.
Grace

In reply to Grace Corcoran

Re: tex

by Sjaak Kamerling -

I have the same problem: algebra and TeX doesn't work: I get an error message after using the algebra and TeXsymbols; can you tell me how I can find out if it is a server problem and how it is possible to solve this problem? Or can there be other reasons for this problem?

Thanks for an answer.

In reply to Sjaak Kamerling

Re: tex

by Zbigniew Fiedorowicz -
What are the error messages from the debugger?
In reply to Zbigniew Fiedorowicz

Re: tex

by Sjaak Kamerling -
This is very fast! Thanks!

At first I'll tell you how I am running Moodle (by the way, I am new to moodle).
I installed the newest moodle with fantastico (I do this within the cpanel-environment, which is provided at the server); I am new to installing this sort of things, but everything went well, except for the algebra and Tex filters (and maybe others, which I didn't use);
I don't know how to use the debugger (sorry) but I looked in the moodle-directory at the server for some info;
two things I will mention:

first: in error_log I get this message:

[24-okt-2005 17:44:00] PHP Warning: shell_exec() has been disabled for security reasons in /home/wisblad/public_html/moodle/filter/algebra/filter.php on line 173
[24-okt-2005 17:44:22] PHP Warning: shell_exec() has been disabled for security reasons in /home/wisblad/public_html/moodle/filter/algebra/filter.php on line 173
[24-okt-2005 17:50:21] PHP Warning: shell_exec() has been disabled for security reasons in /home/wisblad/public_html/moodle/filter/algebra/filter.php on line 173

I searched for the filter.php and on line 173 I found:
$texexp='$cmd' (I hope this is line 173 (I copied the file in Wordpad and maybe the linenumbering has changed)

second:
in config.php I can read: directory permissions=00777

I hope this will help.
If possible tell me how I can use the debugger.
Thanks.



In reply to Sjaak Kamerling

Re: tex

by Zbigniew Fiedorowicz -
You don't have to use the debugger.  The error message you just posted tells the story.  Your provider has disabled the mechanism which allows the tex/algebra filters to work.  You should try the jsMath filter discussed in this forum instead.  Or you could switch to another hosting provider.
In reply to Zbigniew Fiedorowicz

Re: tex

by Sjaak Kamerling -
Thanks for your answer. I contacted the helpdesk of my provider. They told me that they don't work in so called safemode, but that indeed at serverlevel the php-function shell_exec was inactive. But for my moodle-environment it has been activated now. Still I get the same errormessages. Can there be anything else as a reason for the errormessages?
In reply to Sjaak Kamerling

Re: tex

by Sjaak Kamerling -

shell_exec() has been activated (after my last posting too, but there was still some safety-level, and as I wrote, this had no success).

Now, the errormessages I mentioned, are gone. But now I get at the places where math-text should stand, boxes with a red cross, but no images. What can be wrong now?

In reply to Sjaak Kamerling

Re: tex

by Sjaak Kamerling -

Follow up message:

strange behaviour: when I went back to my moodle-environment I saw some mathematical text: the x^2 between double@ turned in a right math-expression (hooray); the x^2 between double$$ didn't work; so it looked as if the algebra filter did its job, so I tried some more expressions from examples; but, it's bizarre, this doesn't work; only my x^2 does work in the algebra filter; I don't understand a bit of it   

In reply to Sjaak Kamerling

Re: tex

by Zbigniew Fiedorowicz -
While logged in as administrator, click on the red cross boxes. That will bring up the tex debugger. What happens when you click on the "Show Image" button? Also if you send me the url of your site, I can take a look at it myself. (You can email me privately with the url.)

In reply to Zbigniew Fiedorowicz

Re: tex

by Sjaak Kamerling -

When clicking on the box with an 'algebra'-text, I get:

Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/algebra/algebradebug.php on line 255

Warning: system() has been disabled for security reasons in /home/wisblad/public_html/moodle/filter/algebra/algebradebug.php on line 255


Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/algebra/algebradebug.php on line 273
The shell command
"/home/wisblad/public_html/moodle/filter/tex/mimetex.linux" -e "/home/wisblad/public_html/moodle/uploaddata/filter/algebra/c91bdff30bfc831ff645b8442bed761a.gif" '\Large y^{2}'
returned status =

Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/algebra/algebradebug.php on line 274

Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/algebra/algebradebug.php on line 276

Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/algebra/algebradebug.php on line 278
File size of mimetex executable /home/wisblad/public_html/moodle/filter/tex/mimetex.linux is 429514
The file permissions are: 100755
The md5 checksum of the file is e14b7159b8738a60e7909226e8edc5ce
Image not found!

When clicking on the box with an 'TeX'-text, I get:


Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/tex/texdebug.php on line 131

Warning: system() has been disabled for security reasons in /home/wisblad/public_html/moodle/filter/tex/texdebug.php on line 131


Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/tex/texdebug.php on line 149
The shell command
"/home/wisblad/public_html/moodle/filter/tex/mimetex.linux" -e "/home/wisblad/public_html/moodle/uploaddata/filter/tex/74c2b66b2d2501b77fad711fd1febcf0.gif" '\Large f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt'
returned status =

Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/tex/texdebug.php on line 150

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

Notice: Undefined variable: status in /home/wisblad/public_html/moodle/filter/tex/texdebug.php on line 154
File size of mimetex executable /home/wisblad/public_html/moodle/filter/tex/mimetex.linux is 429514
The file permissions are: 100755
The md5 checksum of the file is e14b7159b8738a60e7909226e8edc5ce
Image not found!

Some remarks:

at first clicking (when logged in as administrator) I got no debugging window; only a popupwindow appeared with the algebra-code (in this case y^2); after turning on editing, I was able to enter the debugging window; after closing editing, I was also able to do so;  the same thing happened with TeX-code;

I wrote you that x^2 has been displayed; when just returning to my site after about ten visits this evening, I also see an y^2 appear, where once there was a red-crossed box; so I tried other things; no luck; at this time I can handle with x^2 and y^2; where will this end...? 

I'll mail you at this moment the url.

Thanks and greetings

Sjaak K

In reply to Sjaak Kamerling

Re: tex

by Zbigniew Fiedorowicz -
The relevant error message is

Warning: system() has been disabled for security reasons in /home/wisblad/public_html/moodle/filter/algebra/algebradebug.php on line 255

You have 3 options:
  1. Get your hosting provider to fix this.
  2. Get another hosting provider.
  3. Use jsMath filter instead.

In reply to Zbigniew Fiedorowicz

Re: tex

by Sjaak Kamerling -

I'll ask my hosting provider to fix this.

In the meantime there is my wondering why, with the algebra filter, at first nothing did work, later on x^2 did work and then y^2 also did work  Do you know an explanation for this behaviour?

In reply to Sjaak Kamerling

Re: tex

by Sjaak Kamerling -

An addendum at my last post:

Unbelievable 1: at first, with the algebrafilter, only x^2, y^2 worked, now also z^2 works.

Unbelievable 2: when I place the mentioned expressions in the algebradebugger then 'show image' gives the same errormessages as the expressions which don't work. 

It seems that some expressions after some time show up in an illegal way.

 

In reply to Zbigniew Fiedorowicz

Re: tex-MOODLE

by Bhupinder Singh -

Hi Zbigniew Fiedorowicz ,

I am new to Maths expressions in Moodle.

I shall be grateful if you could advise where I cam find reading and practice material to use the filters given in Moodle.

Your help shall be very nice.

Regards

Garry