After installing ASCIIMATH into /lib, and changing the meta.php in /theme/mytheme, I am now able to have the output of Dragmath as viewable, but only in Firefox - not in IE.
Furthermore, when I export in moodletex, the image does not display correctly in either browser. Some possibly pertinent information: I have access to the server (it is down the hall), but am not very familiar with how to set permissions (I'm not the IT guru). A step by step would be helpful. It is a Windows server. We are running Moodle 1.9.7
I have several questions:
1. How do I go about getting the base tex filter to work properly? (Thus, not needing asciimath or latex)
2. How can I correct for the improper display in IE without requiring Mathplayer to be installed on every client machine? Will this be corrected with the base tex filter?
3. What filters/files/other should I be downloading and installing on the server to accomplish this task?
Any help would be appreciated. Thank you!
Dragmath moodletex output outputs for the moodle tex filter and asciimath output for asciimath. Since you indicate you don't have Tex filter on, Tex expressions in moodle Tex delimiters won't work.
IE does not follow w3c standards via mathml, do it does not display mathml without plugin, but asciimath has fallback that addresses this which you need to configure. There are now more options than ever for fallback, including the google chart API .
If you want to get moodle Tex filter running you can. You can also install jsMath or mathjax. But there is no reason what you are doing now won't satisfy your needs with a bit of configuration.
BTW, you can also output from dragmath with latex tokens for asciimath, which will insert Tex text expressions, but with the correct number of dollar signs for asciimath
Thank you for responding. It is helpful to have someone to bounce ideas off of, and to talk it through.
I've read the documentation on Dragmath, Tex Notation Filter, filters, and asciimath.
Unfortunately, I'm still missing some key piece of information to get it all working smoothly.
1. I do have the Tex filter on, at least in the sense that I have the eyeball open in the Site Administration > Filters (see attached pic)... Other than this, I don't know how to get the moodle Tex filter running.
2. Fallback: I tried installing the replacement file, but received a giant red banner at the top of IE, and no joy.
3. I'm at a loss as to where to go from here.
Again, thank you!
First off, re fallback, please provide details of what you actually did so that I can determine what file you are using (or you can send me a message with your URL and I can poke at it) Fallback relies on a variable setting in asciimathml.js that is described in the docs. Frankly I don't recall what it is set to by default, but the first thing would be to double check and make sure that the fallback is indeed working. Once fallback is up and running you should be able to manage without the banner and without the plugin and without tex.
As far as tex is concerned you need to look at the docs: http://docs.moodle.org/en/TeX_filter#Debugging_TeX_filter Your problem will be compounded by the fact that you are using WIndows as a server (I am allergic, don't you know) though Mauno runs a windows server and has played with the windows perms. But first thing is to run the texdebug and report the results. if the binaries are not there then you probably want to install texLive. If they are there but there are perm options then you need to set thenm correctly, and I think there is info on that in the forums (which should likely get included in the tex filter docs if it is not already....)
Now, you need not use tex and asciimath. Asciimath provides quite a few extra benefits over the moodle tex filter for many uers, especially if you are not pushing the limits of what tex can otherwise do, including asciisvg, calculators, chatmath, etc and it is extensible and works without a server. Asciimathml also provides a simpler syntax, which is why Peter says he started fiddling with it in the first place
As I mentioned, you can set dragmath to do single or double dollars and asciimathml will do latex based upon its inclusion in v2 (the version posted) of much of latexmathml.
Frankly, I would resolve the asciimathml fallback issues first and see if that satisfies you, and if so, turn off tex filter so that does not slow down display of pages, and if you are happy, set dragmath to a default output that you want.
In addition to those things that Marc mentioned:
1) If you use IIS you need to check (in IIS manager) that IUSER (IIS_USER) has permission to execute file filter/tex/mimetex.exe and write to moodledata - Sunil had some problems with IIS7 in http://moodle.org/mod/forum/discuss.php?d=141710
If you use Apache (XAMPP) try in Resource manager mouse right click over mimetex.exe - Properties and add from Security tab Full permissions for users of that file...
2) There are many versions of fallback files available and most of them have needed settings at the beginning of file itself - you can edit ASCIIMathML.js with some text editor. If you want to try a file that has some working fallback already functional try to download for example http://korpelainen.net/plugindemo/lib/editor/common/AM.js (that is using Mathtex fallback) or http://korpelainen.net/gmoodle/lib/editor/common/AMgoogle.js (that is using Google Chart API tex fallback) and rename the downloaded file to your ASCIIMathML.js
3) You can disable Algebra filter
PS. Installing some full distribution of Latex - for example Tex Live or MikTex together with GhostScript or ImageMagick may work with correct Windows installer files as soon as you find the correct paths (no "..." around windows paths) for latex, dvips and convert in administration of tex filter but sometimes you need to change environment variables (PATH) etc but basicly you should find info about installing those programs that are not part of moodle from the actual download sites of Tex Live etc.
var AMTcgiloc = "http://www.mymimetexserver.com/cgi-bin/mimetex.cgi"; //path to CGI script that can render a TeX string
You need to put the url of the fallback script you want to use in place of the ersatz one provided. If mimetex is in fact present on your system and working things will be fine.
In some systems we can simply check to see if mimetex is working by doing something like this:
http://fqdn/pathtomimetex/mimetex.cgi?x^2
Mauno has done quite a bit of work on the files he mentions and the file referencing the google chart api is very nice as it eliminate the need to work about a local fallback renderer.
Mauno, are you going to consider either of the scripts "releasable" such that we can offer them on Moodle so as to avoid confusion if you do further edits? You had written about packaging things up and documenting but I am not sure what the status of that is. Since the version of the fallback I posted is now a bit dated and still relies on a sourceforge download, I do think it would be nice to include your full package on Moodle, at which point we could update the docs to address the changes you've made.
Marc,
I have not changed my files since December just for one reason - moodle 2.0.
When Petr started to implement those latest theme changes many things in moodle 2.0 changed too (role of YUI3, the whole use of javascripts as a part of totally new theme system etc) and I wanted to avoid doing the same things over and over again. Editor plugins of TinyMCE will also use new code in moodle 2.0 & new code of jsxGraph / GeoNext, role of Microsoft in SVG group (IE9) may be interesting and so on.
About 100 moodle sites have downloaded and tested the plugins documented in http://korpelainen.net/mediawiki/index.php/Main_Page and I just checked yesterday my mathtex.cgi log file that was still reasonable small meaning that most sites that have tested the plugins have been able to set up own fallback renderer or use either Google Chart API tex or MathTran - or use some other math renderer like for example Wiris. Only about 5 sites are continuously using my site mathtex.cgi (which is of course mainly meant for testing, not for a long time use)
So I have not frozen my testing - January and February have been rather busy at my daily work (teaching) and I have mostly tried to relax and follow the coming features of moodle 2.0.
According to Roadmap we will see in
March 2010: Moodle 2.0 Beta release
April, May, June 2010: intensive beta testing and bug fixing (freeze on new features)
1 July 2010: Moodle 2.0 production release
and on schedule I could create an up-to-date "math package" with all current features during this beta testing period both for moodle 2.0 and pre 2.0 releases.
1. We have confirmed that none of the three binaries were installed. We have intentions on downloading and installing:
http://www.miktex.org/2.8/setup -This is the windows version of LaTeX
http://ghostscript.com/releases/gs871w32.exe - windows version of ghostscript
2. We have set the file permissions, and the IUSER can now access both the filter/tex/ directory, as well as /moodledata/
3. We turned on the debugging, and are receiving the following error:
Warning: system() [function.system]: Unable to fork [C:\moodle/filter/tex/mimetex.exe ++ -e "C:\moodledata/filter/tex/d1e56126337cd6e29b16fe759232ce90.gif" -- "\Large f(x)=\\Bigint_{-\\infty}^x~e^{-t^2}dt"] in C:\moodle\filter\tex\texdebug.php on line 139
Warning: shell_exec() [function.shell-exec]: Unable to execute 'C:\moodle/filter/tex/mimetex.exe ++ -e "C:\moodledata/filter/tex/d1e56126337cd6e29b16fe759232ce90.gif" -- "\Large f(x)=\\Bigint_{-\\infty}^x~e^{-t^2}dt" 2>&1' in C:\moodle\filter\tex\texdebug.php on line 150
The shell command
C:\moodle/filter/tex/mimetex.exe ++ -e "C:\moodledata/filter/tex/d1e56126337cd6e29b16fe759232ce90.gif" -- "\Large f(x)=\\Bigint_{-\\infty}^x~e^{-t^2}dt"
returned status = -1
File size of mimetex executable C:\moodle/filter/tex/mimetex.exe is 943027
The file permissions are: 100777
The md5 checksum of the file is 8bb2d0687c94dcecee38fc241db5f565
Image not found!
No text output available
I'm wondering if we did a fresh install of Moodle 1.9.7 if this should work?
You get mimetex from forkosh for that matter, I'd spend a lttle time figuring out what the mimetex issue is and confirming that the are images being written to moodledata/filter/tex
You could also install on a real OS ....
We did run mimetex from the command line - it gave us a nice little x^2 image in the command line. How to compile an image from there is a different story. We can't get anything to output to file.
With MikTex and GS 8.7.1 installed, we are still getting the following errors:
Warning: exec() [function.exec]: Unable to fork ["c:\moodle\MikTex\miktex\bin\latex.exe" --interaction=nonstopmode C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.tex] in C:\moodle\filter\tex\texdebug.php on line 254
Warning: exec() [function.exec]: Unable to fork ["c:\moodle\MiKTeX\miktex\bin\dvips.exe" -E C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.dvi -o C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps] in C:\moodle\filter\tex\texdebug.php on line 254
Warning: exec() [function.exec]: Unable to fork ["c:\moodle\gs\gs8.71\bin\gswin32.exe" -density 240 -trim C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.gif ] in C:\moodle\filter\tex\texdebug.php on line 254
Checking executables
Error: latex executable ("c:\moodle\MikTex\miktex\bin\latex.exe") is not readableError: dvips executable ("c:\moodle\MiKTeX\miktex\bin\dvips.exe") is not readable
Error: convert executable ("c:\moodle\gs\gs8.71\bin\gswin32.exe") is not readable
base filename for expression is 'd1e56126337cd6e29b16fe759232ce90'
Processing TeX expression:
f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt
$ "c:\moodle\MikTex\miktex\bin\latex.exe" --interaction=nonstopmode C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.tex OUTPUT: RETURN CODE: -1
$ "c:\moodle\MiKTeX\miktex\bin\dvips.exe" -E C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.dvi -o C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps OUTPUT: RETURN CODE: -1
$ "c:\moodle\gs\gs8.71\bin\gswin32.exe" -density 240 -trim C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.gif OUTPUT: RETURN CODE: -1
If you want to install Imagemagick instead of GhostScript the Windows installer files can be found from http://www.imagemagick.org/script/binary-releases.php#windows
In your previous post (image)
you had double quote marks in paths. Check if path of latex binary should be written without double quote marks
C:\moodle\MikTex\miktex\bin\latex.exe
and path of dvips binary sould probably be
C:\moodle\MiKTeX\miktex\bin\dvips.exe
The same way path of convert binary might be C:\path_to_your_ImageMagick\convert.exe or in your case C:\moodle\gs\gs8.71\bin\gswin32.exe for GhostScript convert binary file. And those files should be executable by IUSER.
Good catch with the "double quotes "... I just made the change and now the debug error reads differently. Those binaries are now readable! Still no image, but I think this is progress.
Warning: exec() [function.exec]: Unable to fork [c:\moodle\MikTex\miktex\bin\latex.exe --interaction=nonstopmode C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.tex] in C:\moodle\filter\tex\texdebug.php on line 254
Warning: exec() [function.exec]: Unable to fork [c:\moodle\MiKTeX\miktex\bin\dvips.exe -E C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.dvi -o C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps] in C:\moodle\filter\tex\texdebug.php on line 254
Warning: exec() [function.exec]: Unable to fork [c:\moodle\gs\gs8.71\bin\gswin32.exe -density 240 -trim C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.gif ] in C:\moodle\filter\tex\texdebug.php on line 254
Checking executables
latex executable (c:\moodle\MikTex\miktex\bin\latex.exe) is readabledvips executable (c:\moodle\MiKTeX\miktex\bin\dvips.exe) is readable
convert executable (c:\moodle\gs\gs8.71\bin\gswin32.exe) is readable
base filename for expression is 'd1e56126337cd6e29b16fe759232ce90'
Processing TeX expression:
f(x)=\Bigint_{-\infty}^x~e^{-t^2}dt
$ c:\moodle\MikTex\miktex\bin\latex.exe --interaction=nonstopmode C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.tex OUTPUT: RETURN CODE: -1
$ c:\moodle\MiKTeX\miktex\bin\dvips.exe -E C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.dvi -o C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps OUTPUT: RETURN CODE: -1
$ c:\moodle\gs\gs8.71\bin\gswin32.exe -density 240 -trim C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.ps C:\moodledata/temp/latex/d1e56126337cd6e29b16fe759232ce90.gif OUTPUT: RETURN CODE: -1
Previous debugging told that php commands system() and shell_exec() could not be used with mimetex and here exec() does not work so php.ini might some restrictions (for example disabled functions exec(), system() and shell_exec()... ) or some extra server security settings might prevent executing files...
* Mauno has posted regarding two asciimathml files he has been working with in another thread in this forum at least oen of which falls back to google chart api I believe.