Results 1 to 8 of 8

Math Help - How do you do what you do?

  1. #1
    Super Member Matt Westwood's Avatar
    Joined
    Jul 2008
    From
    Reading, UK
    Posts
    802
    Thanks
    22

    How do you do what you do?

    I've just spent the best part of the week trying to set up my PC so that I can put mathematics up on the web.

    I have a machine running Vista Home Edition (or whatever it's called, go on, laugh) but I'm fairly sure it's possible to do what I want to achieve using it.

    The technique I tried was to install a MediaWiki on my local machine, as I know you can use LaTeX inside a wiki page and that will work.

    I've already got a MySQL database running, I use it with Java apps I write, so that wasn't a problem.

    Getting Apache2.2 and PHP to work together with MySQL was a challenge but not insurmountable, and I now have a MediaWiki (local only at the moment) with which I can play.

    The next stage was to get it to understand LaTeX. So I followed the instructions and downloaded ImageMagick, OCaml (Objective Caml) and MinGW (Minimalist GNU for Windows), and also Ghostscript and GSView (they were originally part of my LaTeX installation that I've been using for some years but since the last HD crash I hadn't re-installed them - so that had to be done).

    So far so good, but when I try to write maths using LaTeX the way it says to do so, it gives me that annoying message:

    Failed to parse (Can't write to or create math temp directory): p \Longrightarrow q, q \not \vdash p

    ... which so many people have had trouble with in the past and there appears to be no cut & dried solution to.

    So the question here is twofold:

    a) Is there anyone out there who has managed to achieve this aim on the Vista platform? If so, I would welcome your experience. If all goes well I will document what I did to get it working so there will be one more nugget of info for the next person with this trouble. (I admit that the info given above is sketchy, I can provide full details of what I did and answer any relevant questions about my LocalSettings.php etc. when requested.)

    b) If it turns out I can't get the kit working properly, my second choice would be to see whether I can use a similar software package to the one you use here. In which case, does anyone have a link to a set of installation instructions that I can use?

    I would be greatly indebted to anyone who can help. The existing forums on MediaWiki etc. seem to have been exhausted for tips.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    South Africa
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by Matt Westwood View Post
    Failed to parse (Can't write to or create math temp directory): p \Longrightarrow q, q \not \vdash p
    What(location) is the math temp directory? Did you create such a directory for it?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member Matt Westwood's Avatar
    Joined
    Jul 2008
    From
    Reading, UK
    Posts
    802
    Thanks
    22
    Got that covered, I think ...

    C:/www/mediawiki-1.12.0/tmp

    I have these (among lots of other things) in my LocalSettings.php:

    $wgScriptPath = "/mediawiki-1.12.0";
    $wgScriptExtension = ".php";
    $wgUploadPath = "${wgScriptPath}/images";
    $wgMathPath = "${wgUploadPath}/math";

    $wgTmpDirectory = "${wgScriptPath}/tmp";

    $wgUseImageMagick = true;
    $wgImageMagickConvertCommand = "C:/Program Files/ImageMagick-6.4.2-Q16/convert";

    I have ensured that all users have full access to the above /tmp directory, and I have also set up:

    C:/www/mediawiki-1.12.0/images/math

    C:/www/mediawiki-1.12.0/images/tmp

    ... also with full access (as someone on another forum made the comment that he had to do the above to get his installation working).

    Thinks: do I also need .../math/tmp as well? Let me just try that ...
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    South Africa
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by Matt Westwood View Post
    Got that covered, I think ...

    C:/www/mediawiki-1.12.0/tmp

    I have these (among lots of other things) in my LocalSettings.php:

    $wgScriptPath = "/mediawiki-1.12.0";
    $wgScriptExtension = ".php";
    $wgUploadPath = "${wgScriptPath}/images";
    $wgMathPath = "${wgUploadPath}/math";

    $wgTmpDirectory = "${wgScriptPath}/tmp";

    $wgUseImageMagick = true;
    $wgImageMagickConvertCommand = "C:/Program Files/ImageMagick-6.4.2-Q16/convert";

    I have ensured that all users have full access to the above /tmp directory, and I have also set up:

    C:/www/mediawiki-1.12.0/images/math

    C:/www/mediawiki-1.12.0/images/tmp

    ... also with full access (as someone on another forum made the comment that he had to do the above to get his installation working).

    Thinks: do I also need .../math/tmp as well? Let me just try that ...
    I haven't set this up before, I'm just thinking of possible causes.
    Should you tell the app where the temp directory is? A setting somewhere?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member Matt Westwood's Avatar
    Joined
    Jul 2008
    From
    Reading, UK
    Posts
    802
    Thanks
    22
    Yes, that's what I thought the line:

    $wgTmpDirectory = "${wgScriptPath}/tmp";

    ... was doing in the LocalSettings.php file. But, as is apparent, there is still a problem with this.

    I'm wondering whether it's a mis-reporting of the error - like, maybe it's not able to build the object from the LaTeX rather than not being able to get to the tmp directory.

    I'm concerned about the fact that I remember fleetingly somewhere in a forum (can't find it now) where it mentions that gsview is needed (or is it just ghostscript?) and, although I have installed both of these and included their locations in my path in the environment variable settings, there appears to be no explicit mention of them in the LocalSettings.php (or anywhere else in the MediaWiki settings) and I'm not sure (a) whether they should be or (b) what they ought to be.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member Matt Westwood's Avatar
    Joined
    Jul 2008
    From
    Reading, UK
    Posts
    802
    Thanks
    22
    Now I'm kicking myself.

    Decided that ImageMagick may not have liked being installed in a directory with a space in the name (C:\Program Files\Ima... etc.) so I deinstalled it. Then I found I'd forgotten to save the downloader on my backup drive.

    Then when I went back to the website to download it again, it's consistently 404ing on me.

    Remember, children, *always* backup your work ...
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Super Member Matt Westwood's Avatar
    Joined
    Jul 2008
    From
    Reading, UK
    Posts
    802
    Thanks
    22
    ... okay that's sorted out, I've made sure the commands "latex", "dvips","gs" and "convert" all work from a DOS prompt (the "gs" one was awkward, had to copy "gswin32" to "gs" in the ghostscript "bin" directory, but that seems to work now, sort-of-a-bit-ish).

    And the same problem is apparent. This is bewildering.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Super Member Matt Westwood's Avatar
    Joined
    Jul 2008
    From
    Reading, UK
    Posts
    802
    Thanks
    22
    I approached it from a different direction.

    I set up a Simple Machines Forum on my machine and did some reverse engineering on it.

    I have established that if I use the link:

    [LEFT]<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\reverse \frac {\mathrm {d}^2 y} {\mathrm {d} x^2} - 2x \frac {\mathrm {d} y} {\mathrm {d} x} + 2py = 0" border="0" align="absmiddle" >

    ... or whatever, I can get LaTeX translated.

    It's a start. For my next trick, I need to find out why when I compile my own local version of mimetex.cgi, it works fine when I run it from a DOS prompt, but not from a web page, local or not.

    So I have my technique for putting maths up on a website (limited though it may be), so I'm on the right track.

    Best of luck for anyone going down this route, I can offer a modicum of advice based on a series of more-or-less unsuccessful attempts ...
    Follow Math Help Forum on Facebook and Google+


/mathhelpforum @mathhelpforum