Did you install Ghost Script?
Does TeX work on the server?
Thank you very much for your answer!
No I don't install Ghost script!
How can I verify if TeX work on the server?
I believe you must install Ghostscript (fx version 8.62) to make things work.
Regarding TeX: Create a new xxx.txt document and rename it to xxx.tex. The server must open it with latex.exe - otherwise instruct your server to do so.
LaTex run correctly on the server.
I installed Ghostscript on the server but I don't Know how to say to moodle that now he can use GhostScript to show correctly math formula.
In the setting windows of tex-filter I set both the latex.exe path. dvips.exe path and convert path.
Ghostscript runs behind the scene and is part of the convertion proces somehow (actually I can't remember what it does).
Reboot the server and open Control panel -> System -> Advanced -> Environment variables -> System variables -> Path and check that the binaries is known by the server: "C:\Program Files\ImageMagick-6.3.3-Q16;C:\Program Files\MiKTeX 2.5\miktex\bin;...".
Both latex.exe and dvips.exe are in the MikTex path and convert.exe is in the ImageMagick path.
Surely you have some other version numbers.
Now your server knows the path to latex.exe, dvips.exe and convert.exe.
Log on to Moodle and go to the Admin menu -> Modules -> Filters -> Tex Notations Setting and just write for the
Path of latex binary: latex
Path of dvips binary: dvips
Path of convert binary: convert
Save the changes and write some tex stuff in a forum or whatever.
Let us know if it helps...
Unfortunately it does not work still!
If I write in moodle this text:
a^2x-2a=b (2+bx) (with double $ at the begin and at the end)
a small box with a red cross appears (like when a HTML page do not found the source for an image) with neighbor a^2x-2a=b (2+bx).
The box is a link that bring me to the debug page.
If I tape: a^2x-2a=b (2+bx) the page replay:
"Can not output detailed information due to security concerns, please turn on debug mode first."
Have you some suggestion?
It's a good idea to turn on debugging and show 'all messages' while you are debugging. You do that from the admin menu-> server.
If you look in the Moodledata folder there is a subfolder named 'tex'. Is this folder empty?
The folder moodledata\filter\tex is empty!
After the activation of the debug if I open the debug page and type the string: "a^2x" in the text box for the test and I choice the option: "Show command execution output from the algebraic expression rendered with Tex/Ghostscript" the result is:
Error: latex executable (latex) is not readable
Error: dvips executable (dvips) is not readable
Error: convert executable (convert) is not readable
base filename for expression is '4aa8ee671a2c1cc1034cd7fb9cf05683'
Processing TeX expression:
$ latex --interaction=nonstopmode C:\Inetpub\Sito2\moodledata/temp/latex/4aa8ee671a2c1cc1034cd7fb9cf05683.tex OUTPUT: RETURN CODE: -1
$ dvips -E C:\Inetpub\Sito2\moodledata/temp/latex/4aa8ee671a2c1cc1034cd7fb9cf05683.dvi -o C:\Inetpub\Sito2\moodledata/temp/latex/4aa8ee671a2c1cc1034cd7fb9cf05683.ps OUTPUT: RETURN CODE: -1
$ convert -density 240 -trim C:\Inetpub\Sito2\moodledata/temp/latex/4aa8ee671a2c1cc1034cd7fb9cf05683.ps C:\Inetpub\Sito2\moodledata/temp/latex/4aa8ee671a2c1cc1034cd7fb9cf05683.gif OUTPUT: RETURN CODE: -1
Is it possible a permission problem?
I have given complete control to "IUSR_ServerName" and to "Network Service" windows users but evidently not enough.
What do you suggest?
If you installed the standard xampp package there should be no permission problems with Apache.
If you run IIS I suggest you direct the issue to the windows server forum.
Otherwise just do the usual: Uninstall miktex, imagemagick and ghostscript and restart the server (the computer). Make sure the system paths are cleaned.
Reinstall miktex, ghostscript and imagemagick. Restart computer. Check the system paths. Check that tex extensions are opened with latex.exe.
What do you mean for:
"Check that tex extensions are opened with latex.exe"?
I mean that a file with extension ".tex" should open with latex.exe automatically when clicked.
Excuse me, Morten, if I bore you with this problem but I just do not succeed to resolve it.
I have made all that you have advised to me and I have reinstalled MikTex, GhostScript and Imagemagick but I have obtained no various result.
But I wont to ask you: what do you mean when you say that if I clicK a file with .tex extension it runs on the server?
If I click on .tex file, I generated, in the same folder, three new file with extension .dvi, .aux and .log and then, only opening (when I click) the file with extension .dvi I see in a window the immage of the formula.
I am not able to open directly on the server the files with .tex extension
Is this a normal thing?
Thanks for your patience
To test the path to Latex you can simply create a new (empty) text-document "newdocument.txt" and rename it to "newdocument.tex". When you click this tex-document the server should open it with Latex.exe (producing some error messages in a command window).
To verify ImageMagick is working properly, type the following in an MS-DOS Command Prompt window (the run-command from the start menu):
convert logo: logo.gif
(First put a picture logo.gif into your account folder of the Documents and Settings directory)
Each of the above lines should be typed in one by one. The first line produces nothing (besides a flickering open and close of a window). And the second line produces nothing (besides a flickering open and close of a window). But the third line should invoke a new window to open with the image of the magician. This means ImageMagick is properly installed and the path to convert.exe works.
Maybe this will narrow your search for a solution, but don't hesitate to tell us whether it works or not.
I'm no expert on IIS, but I wonder what would happen if you increase the permissions for IWAM_ServerName.
For the same type of problem, the solution was to give IUSR or IWAM permission to write in temp folder. Otherwise, you couldn't create picture of your equation.
I do not know if you say this with experience but I give complete control to IUSR_ServerName in the moodledata/temp folder and nothing happen!
I obtain the result of showing correct formulas (write in tex language) only giving write permission to IUSR user in the cmd.exe file.
But is not possible to give write permission on the cmd.exe file at IUSR_NameServer user in a WebServer machine!!! (do you agree?)