Algebra Filter

Algebra Filter

by Konstantinos Ingkas -
Number of replies: 12

Hi,

I have installed Moodle (ver 1.9.9) in a WINDOWS XP PC. I wrote a simple fraction in a topic of a course to see if it is working (the fraction : \frac{1}{2}).

When I pressed the save button the system stalled. Then I tried to debug the filter using the algebradebug.php (http://localhost/filter/algebra/algebradebug.php), but instead of the algebra filter debuger page I saw a login screen. This happend several times. Could anybody give some help on this ? 

Thanks in advance.

Konstantinos Ingkas.

Average of ratings: -
In reply to Konstantinos Ingkas

Re: Algebra Filter

by Colin Fraser -
Picture of Documentation writers Picture of Testers
mmmm have you activated the algebra and TeX Notation filters?

Go to:
  • Administration Modules Filters Manage filters
and select Algebra Notation and Tex Notation, the activation eyes are closed in the default, so turn them on by clicking the eyes, softly though.

I suggest you install MikTeX as well and Imagemagick. In the Tex Notation Settings, place the paths to the latex. and dvips. exe files and the convert.exe in Imagemagick. Once done, you can start with the Tex Notation Filter page and then go to the Using Tex Notation in Moodle pages. They may help - if you need it. Once I found out I had to do that, it was pretty plain sailing after that. But the rest is still Secret Squirrel stuff.. for the moment..thoughtful
In reply to Colin Fraser

Re: Algebra Filter

by Sandra Ciutad -

Hi

I can't view latex properly in moodle, I have yet installed miktek and imagemagick and even ghostscript and perl.

All the paths in de Tex notation filter are ok. With a green tick on the right!

But I still get this:

Sigui f una aplicació lineal de la qual sabem:
f:R_^{2} \rightarrow P_{2}(x)
(a,b)\rightarrow f(a,b)=(a-b)+bx+ax^{2}
Sigui g:P_{2}(x) \rightarrow M_{2x2} una altra aplicació lineal on:
G_{B2B3}=\begin{pmatrix}1&0&1\\0&1&-1\\-1&0&1\\2&0&2\end{pmatrix}
Tenim la següent informació:
B1={(1,0),(1,1)} base de R^{2}
B2={1+x,1,x^{2}},B4={x,1,x^{2}} bases de P_{2}(x)
B3={\begin{pmatrix}1&0\\0&0\end{pmatrix},\begin{pmatrix}0&0\\2&0\end{pmatrix},\begin{pmatrix}0&1\\0&0\end{pmatrix},\begin{pmatrix}0&0\\1&1\end{pmatrix}} base de M_{2x2}
Si p=1+x+x^{2} \in P_{2}
Quina és una base i la dimensió del nucli de l'aplicació g?
Seleccione una respuesta.
a. Baseker(g)={-x+x^{2}}, i la seva dimensió és 1
b. Cap de les respostes és vàlida
c. Baseker(g)={x,-x+x^{2}}, i la seva dimensió és 2
d. Baseker(g)={1,-x+x^{2}}, i la seva dimensió és 2

I have been hours fighting with this!!Please any help??

In reply to Sandra Ciutad

Re: Algebra Filter

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Hi Sandra, firstly, patience, do not fight with anything, it is not worth it.

If you have posted here then you have made sure you have turned the filters on.

I have tested your equations and there is nothing there that is not working so I am wondering...

1) have you used the standard MikTex command set?

If so then you may want to try the TeX Notation commands.

2) Have you looked at the Using TeX Notation pages?

If not then you may find some success there.

So I tested this and it worked:

Attachment algebrafilter.png
In reply to Colin Fraser

Re: Algebra Filter

by Colin Fraser -
Picture of Documentation writers Picture of Testers
There were a couple of coding errors, but nothing so great that it would not work properly. The Matrices would probably look funny, but that was all, everything else worked fine.

Attachment algebrafilter02a.png
In reply to Colin Fraser

Re: Algebra Filter

by Sandra Ciutad -

How come you both can see it??

I have installed MikTEk 2.8, Ghostscript 8.71 and ImageMagick 6.6.4 Q16.

I have modify the last 3 settings in Notation Tex filter like this:

Ajustes de LaTeX

Preámbulo LaTeXfilter_tex_latexpreamble
\usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \RequirePackage{amsmath,amssymb,latexsym}
Valor por defecto:
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\RequirePackage{amsmath,amssymb,latexsym}
Color Transparentefilter_tex_latexbackground
Valor por defecto: #FFFFFF
Densidadfilter_tex_density
Valor por defecto: 120
Ruta de latex binariofilter_tex_pathlatex
Valor por defecto: "c:\texmf\miktex\bin\latex.exe"
Ruta de dvips binariofilter_tex_pathdvips
Valor por defecto: "c:\texmf\miktex\bin\dvips.exe"
Ruta de convert binariofilter_tex_pathconvert
Valor por defecto: "c:\imagemagick\convert.exe"
I assumed that if I had a green correct on the right of the 3 boxes is that I am doing things right.
But it still doesn't work.
OHHH!I have just noticed that if I click over some of the formula I get it correct in a popup window, why I cannot see it in the window with the text?
But others lead me to the debugger and it says this just trying a=b with mimetex option:
Deprecated: Function eregi() is deprecated in C:\X_Server\xampp\htdocs\moodle\lib\filelib.php on line 499

Warning: Cannot modify header information - headers already sent by (output started at C:\X_Server\xampp\htdocs\moodle\lib\filelib.php:499) in C:\X_Server\xampp\htdocs\moodle\lib\filelib.php on line 719
GIF87a0óÿÿÿÕÕÕÊÊÊÀÀÀµµµ©©©bbbTTT!ù,0uÈI«½x"ƒ²ÿà4 ChžT‡®¡Ê¾—à^b3l!Åh”š080¶¤r™“pÃQj(±é0²Š+;9®±œ :‘•ÀZªf=©Ñ©[3lêr\€«öÍk˜€Mdn%2<opB2Œ5?z‹pAI‘;
and this with Tex/ghostscript option:
Deprecated: Function eregi() is deprecated in C:\X_Server\xampp\htdocs\moodle\lib\filelib.php on line 499

Warning: filemtime() [function.filemtime]: stat failed for C:\X_Server\xampp/moodledata/temp/latex/7acaac15494e6820b1ed6d8b539af089.gif in C:\X_Server\xampp\htdocs\moodle\lib\filelib.php on line 687

Warning: filesize() [function.filesize]: stat failed for C:\X_Server\xampp/moodledata/temp/latex/7acaac15494e6820b1ed6d8b539af089.gif in C:\X_Server\xampp\htdocs\moodle\lib\filelib.php on line 688

Warning: Cannot modify header information - headers already sent by (output started at C:\X_Server\xampp\htdocs\moodle\lib\filelib.php:499) in C:\X_Server\xampp\htdocs\moodle\lib\filelib.php on line 719

Warning: fopen(C:\X_Server\xampp/moodledata/temp/latex/7acaac15494e6820b1ed6d8b539af089.gif) [function.fopen]: failed to open stream: No such file or directory in C:\X_Server\xampp\htdocs\moodle\lib\filelib.php on line 1002
Any help would be apreciated!!
Thanks for the quick answer!!
Note: I can see the gifs in moodledata/filter/tex, and they are allright!!
In reply to Sandra Ciutad

Re: Algebra Filter

by Colin Fraser -
Picture of Documentation writers Picture of Testers
ummm does this mean you can see them? They are all right?

And I just noticed..

Valor por defecto: "c:\imagemagick\convert.exe"

I had this too, and forgot about it, but when I installed, I ended up manually writing, "C:\Program Files\imagemagick\convert.exe"

Don't see if it is a problem for you...

EDIT: I dumped the Xamp installation for a standard install btw...
In reply to Colin Fraser

Re: Algebra Filter

by Sandra Ciutad -

Now I see the picture I attached doesn't show my real paths but they are ok.

C:\Program Files (x86)\MiKTeX 2.8\miktex\bin\latex.exe

C:\Program Files (x86)\MiKTeX 2.8\miktex\bin\dvips.exe

C:\X_server\imagemagick\convert.exe

What I can see is that if I load some page with algebraic notations, I get a latex folder in my moodledata/temp folder where I have the expressions and that inside moodledata/filter/tex I have the corresponding images in gif format. But I cannot see them properly in my webpage!

In reply to Sandra Ciutad

Re: Algebra Filter

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Well, that, I suspect is now another problem - outside anything I can help with.. sorry..

The filters are on, the paths are correct, the preamble is set.. just dunno..

There is one thing...

delete the strings from your file locations, let it all fallback onto the MimeTeX filter. If that works then there is something that is preventing it all from working using the MikTex or ImageMagick. If it does not work, then nothing happens, but we narrow it down a lot.


In reply to Sandra Ciutad

Re: Algebra Filter

by Mauno Korpelainen -

This looks like an old php 5.3 bug that was fixed several months ago - http://tracker.moodle.org/browse/MDL-22006

Are you sure that you have the latest files of moodle 1.9.9+ from http://download.moodle.org/ ?

In XP it should be ok to use Program files folder but in Windows Vista or Windows 7 you should never use system folders for latex distributions, GhostScript or Imagemagick. I suppose the only problem here is that your xampp is using php 5.3 and those deprecated functions of php 5.3 launch error debugging which break tex images.

In reply to Mauno Korpelainen

Re: Algebra Filter

by Sandra Ciutad -

THANKSSSSSSS!!!!

Mauno was right!!It was a php bug and I solved it with the link : http://tracker.moodle.org/browse/MDL-22006

I don't have the latest files of moodle but I am in my last days before delivering my thesys and whatever that has something to do with upgrading things is scary!!

Thanks alot to all of you for the quick reply!!

In reply to Sandra Ciutad

Re: Algebra Filter

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Should have seen that myself... I did not realise the xamp releases used php 5.3 because of the bug.. Something to reference for future. Thanks Mauno..