Does anyone know why the TeX Notation filter does not work with uploaded html files if FilterUploadedFiles is set to None?
We have been using the TeX filter for some time now and although it works fine in internal resources such as web page resource, the only way we could get it to display the TeX images properly with uploaded html files was to turn on FilterUploadedFiles.
Now... approx one year later, we have had some changes to our web server, and have upgraded to v.1.9.5, and have had to turn that filter OFF due to MS-Word generated html files not displayinig correctly! Apparently this filter strips the necessary css required to display them properly (?)
Now we are left with tons of html files in math courses that are not rendering...
We are using Moodle v. 1.9.5
OS SUSE 10.2
Any help or insight to this issue would be greatly appreciated!
I don't suppose you have an actual feasible solution???
(We just installed the binaries and for some reason I thought that would render the LaTeX in the html files without them having to go through the filter, but I guess I was wrong as the files are still not working
It appears you are a little confused as to function of moodle filters. To over simplify, any content to be displayed is parses through the filter. In the case of Tex, you are parsing tokens, then passing the Tex text expressions to the binaries for rendering.
Check out asciimath moodle docs and post if you need help.
Moodle 2.0 may have a solution for this in the future but all solutions in this current case seem to be bad solutions for some users...
If you simply turn filters on and tell MS Word HTML document users how to save their files as normal docs (not "Microsoft html format") or how to create html pages to moodle directly or how to clean content in editor with button they might notice that it is not so difficult after all...
You could as well tell math teachers how to create web pages directly to moodle and how to copy content from external resources to normal html pages of moodle where TeX filter does work.
It is possible to add some extra tags to each external resource (attachments) and use external latex renderers. However external scripts may not always work - for example
- external scripts may not parse all tex commands, different distributions of latex have different syntax...so you should have a tailored script for your server and distribution of Latex. Attached one example of attachment with my test server cgi Mathtex.
So the most feasible solution might be to use web standards and stop saving documents as MS-style-HTML...
Note the different use of double dollars and slashed square brackets (inline equations and with line breaks in replacement script)
We do have many faculty that upload Word documents as links; however, most prefer to display as html.
We do also encourage the use of the Web Page Resource whenever we can. However, more often than not, our faculty are starting with an MS Word document of some sort as this is the supported editor for our university. They end up copying and pasting into the Web Page Resource and often that results in additional formatting problems that the faculty member does not want to deal with, or problems such as this: (http://tracker.moodle.org/browse/MDL-16621). The last time we used the Word filter in the editor it did not fix most problems, but that was a while ago, maybe we should look at it again.
We have also tried some external latex programs (asciimath) and have not had success. We are still brainstorming in this area...
And yes, web standards that do not include MS-created html would be ideal! But again, our university supports MS products so unfortunately this is not an option for us in the 'Moodle' department
We did find a temporary workaround to this problem and it's an odd one I have to say ... we found that the problem did not occur when the Glossary Auto Linking filter was off. Fortunately, not a lot of classes were depending on this feature being turned on this term!
So, with the TeX filter on AND the filter uploaded files set to All or just HTML, the MS-word-generated html files display fine. How odd is that??!! It gets better ... our dev server is RHES with apache and this problem does not occur. Everything works as it should regardless of the filter settings and what filter is on. Our Production Server is running SUSE with apache and has been for about one year. The problem seemed to occur when SUSE was updated from 10.1 to 10.2 and subsequent patches (apache, etc.) were applied. Apparently the webserver config is substantially different with the 2 OSs. We initially thought it could be a web server configuration issue as we also have some encoding problems when you click the edit button in the Files area of Moodle. (if you try to edit an html file in moodle, garbage characters are inserted). We are currently working with our linux admin to test on different platforms to try to pinpoit why this is happening one one system and not the other. I wonder if I should open this up for discussion in another area...
But thanks so much for your help and suggestions, it helps just knowing we are not 'missing something' (because we often are! ) and that we are doing all we can to find resolutions.
FYI, copy and paste from OpenOffice works just fine with Moodle ;=} OO also provides quite a braod range of macros and extensions that your staff may find invaluable once introduced to them.... from tools for creating ePUBs, to tools for blogging, building wikis, creating coursework, etc And use of open software places them in an intellectually stimulating environment committed to such tools and the user community, an aesthetic that Word users are probably unfamiliar with, lol
I am very concerned that you indicated that you did not have success with asciimathml because a) I am very fond of asciimathml, b) I have been working hard with Mauno and others to make its usage as simple as possible, and c) I think we have been pretty successful in making asciimathml useful .....
So, I would if nothing else appreciate you letting us know about the problems you faced with asciimathml as I could not finding that you had posted about it previously. As has been mentioned, using a js based tool allows one to invoke the same parser where ever the resource may be located as you can i) include the js in a stand alone resource, ii) reference the js in a resource where the js is not inside the Moodle, iii) as well as invoke the js via theme which can be differentiated by course, user, category etc.
Additionally, we have been looking at a variety of fallback schemes (mimetex, mathtex, mathtran, WA, google docs and even others.....) and some (for example google docs) promise the advantage of being able to totally dispense with any tex rendering binary on the Moodle server.
Lastly, while I am clearly being dramatic about this, there is a bit of a war going on, and for MathML to continue the MathML using community most grow and be vocal....
Glossary autolinking can be a HUGE headache as things start to grow..... so it may be wise to turn this down now anyway....
I am also worried that you seem surprised that you would need tex filter and filteruploadedfiles turned on. the later simply "enables uploaded files (HTML and text only) to be processed by the filters system" http://docs.moodle.org/en/Filters#Filter_uploaded_files . This means that if you want the display of uploaded files to be subject to the tex filter, you would also need to turn on the Tex filter. It is the combination of the two that adds the tex filter to the screening of uploaded files which normally would not get passed through filters.
On the other hand, if the profs are building these word docs why aren;t they using equation editor as use of equation editor would on conversion of the doc to html render the equations as images (which of course would have to be managed in their image folder. Many institutions provide staff with personal ftp accessible web resources. One solution for you is to have faculty upload their converted Word docs to their own web site, and then use an external link to that.
SLES was shipping with access to both apache and apache2, so double check your versions of apache and make sure you are running the same version, and I would compare your conf files as you may discover that you have MIME type and other diffs as far as default config that you may not have considered. While the manner in which the configuration is handled may be different, and sometimes file locations may be a bit different (see, e.g. the discussion of the directory structure employed using apt-get) apache configuration is controlled via apache..... so a side by side comparison of the files should be illuminating - also double check the OS lang setting to make sure that any settings that apache inherits from the OS are consistent (Suse can have unique default settings as it inherits some aspects via its deutsche heritage)
Also remember that encoding can be troublesome from the server side as well as the client side ;=} Here's the w3c pages on such matters.....
Policy wise, perhaps your college needs to rethink its position on FOSS vs COTSS. Asking you to support Moodle without also supporting use of linux, OpenOffice, etc is intellectually and economically indefensible. Moreover, you will notice immediately that Word documents are typically MUCH larger than the same document in other formats. Recently I demonstrated taking an MS-Word doc of almost a meg, and converting that to an OO doc of almost half the size and then to a pdf, an swf and an ePUB, the process resulting in significantly less storage on the server as estimated across all users, and significantly less bandwidth usage to display as well as providing same in a format that is substantially more open than that of MS Word (anyone can compile xpdf....)