Results 1 to 8 of 8

Thread: MediaWiki: Math "Failed to Parse" Error

  1. #1
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15

    MediaWiki: Math "Failed to Parse" Error

    I'm still looking for help with my Wiki. I cannot get math formulas to show up right anywhere or anyhow. I need MAJOR help. I'm a math & physics teacher and would love to use my wiki as a teaching tool.

    Here is an example page:
    http://www.teachanddiscover.net/wiki...?title=Tachyon

    Thanks, in advance, for any and all help!
    Christian Mills
    teachanddiscover.net

  2. #2
    Custom User Title tpoynton's Avatar
    Join Date
    Sep 2004
    Location
    Mass
    Posts
    2,177
    Rep Power
    17
    I know nothing of wiki's and this is not elegant...but this is what I've done in a pinch. Create the formula in Word, then take a screen shot of it using wisdomsoft screen hunter. then, just insert the image file.

    Not efficient, mildly effective, but it will work if you are real stuck and just want to move on.

    that error makes me think that, perhaps, it's missing the texvc executable . that may be an add-on/extension for the wiki. Perhaps you can manually add it, or, it may not be installed (or able to be installed) here at powweb

  3. #3
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    I have MathType, and that would work in a pinch since it converts equations into GIF files to begin with. This gets very, very tedious... However, if this is an issue with Powweb's servers, I'd like them to fix it. I can't be the only Powweb customer with a MediaWiki installation. If it's a problem with my installation, I'd like to know so I can fix it...

    Thanks anyway...

  4. #4
    HalfaBee's Avatar
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    7,266
    Rep Power
    26
    From a quick look at the mediawiki doc's, the texvc is an executable.
    From previous complaints, Powwebs servers will not run executables that have not been compiled by Powweb.

    Have a look thru mediawikis docs, there might be a workaround.
    I don't suffer from laziness, I enjoy every minute!
    Edit your php.ini here
    http://members.powweb.com/member/cgi...nt/PHPplus.bml

  5. #5
    Mod.. with bite.. Croc Hunter's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    7,332
    Rep Power
    26
    What does the README file say about texvc? You can't run executable files on your Powweb account yourself.

    [edit] You snuck in while I was typin Halfa
    Croc Hunter MSC :

  6. #6
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    Could I have Powweb compile an executable by running a command in the "Scheduled Jobs" area in the control panel?

    If so, what would the command line string be? Would it b as simple as
    "run gmake /htdocs/wiki/math/ texvc.exe"?

    Thanks again!
    Christian Mills

    p.s. the readme file contains this info:

    == About texvc ==

    texvc takes LaTeX-compatible equations and produces formatted output in
    HTML, MathML, and (via LaTeX/dvips/ImageMagick) rasterized PNG images.
    Input data is parsed and scrutinized for safety, and the output includes
    an estimate of whether the code is simple enough that HTML rendering will
    look acceptable.

    The program was written by Tomasz Wegrzanowski for use with MediaWiki;
    it's included as part of the MediaWiki package (http://wikipedia.sf.net)
    and is under the GPL license.

    Please report bugs at: http://bugzilla.wikimedia.org/ (under "MediaWiki")

    == Setup ==

    === Requirements ===

    OCaml 3.06 or later is required to compile texvc; this can be acquired
    from http://caml.inria.fr/ if your system doesn't have it available.

    The makefile requires GNU make.

    Rasterization is done via LaTeX, dvips, and ImageMagick. These need
    to be installed and in the PATH: latex, dvips, convert

    To work properly with rendering non-ASCII Unicode characters, a
    supplemental TeX package is needed (cjk-latex in Debian)

    === Installation ===

    Run 'make' (or 'gmake' if GNU make is not your default make). This should
    produce the texvc executable.

    If you're using MediaWiki's install.php and have enabled $wgUseTeX in your
    LocalSettings.php, the installer will try to copy texvc into place, in the
    'math' subdirectory under where wiki.phtml is installed.


    == Usage ==

    Normally texvc is called from MediaWiki's Math.php modules and everything
    Just Works. It can be run manually for testing or for use in another app.

    === Command-line parameters ===

    texvc <temp directory> <output directory> <TeX code> <encoding>

    Be sure to properly quote the TeX code!

    Example:

    texvc /home/wiki/tmp /home/wiki/math "y=x+2" iso-8859-1

    === Output format ===

    Status codes and HTML/MathML transformations are returned on stdout.
    A rasterized PNG file will be written to the output directory, named
    for the MD5 hash code.

    texvc output format is like this:
    +%5 ok, but not html or mathml
    c%5%h ok, conservative html, no mathml
    m%5%h ok, moderate html, no mathml
    l%5%h ok, liberal html, no mathml
    C%5%h\0%m ok, conservative html, with mathml
    M%5%h\0%m ok, moderate html, with mathml
    L%5%h\0%m ok, liberal html, with mathml
    X%5%m ok, no html, with mathml
    S syntax error
    E lexing error
    F%s unknown function %s
    - other error

    \0 - null character
    %5 - md5, 32 hex characters
    %h - html code, without \0 characters
    %m - mathml code, without \0 characters

  7. #7
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    Okay, since Powweb, or anyone else for that matter, has no answer for this, I thought I'd share the solution that I found. This way, anyone in the future who needs a solution to their MATH problems can find this thread AND their solution!

    The Math DOES NOT WORK on Powweb's servers, and therefore, we need to look onto other servers for compiled executables that we can use in our Wikis.

    MediaWiki has a solution that you should try, and it's found on this link:
    http://meta.wikimedia.org/wiki/LaTex_on_a_shared_host

    Now, I could not manage, in my limited knowledge of Unix, to compile the correct "cgi" file using the Terminal on my Mac (another reason... argh!), BUT a link to an off-server cgi file is included. After integrating the appropriate changes in my Math.php file and enabling tex in LocalSettings, it now works.

    "What was sundered and undone shall be whole, the two made one" - Dark Crystal

    here is a link to a page currently employing the scripting:
    http://www.teachanddiscover.net/wiki...?title=Tachyon

    You'll notice the nice pretty equations in place of the former big bold text "Failed to Parse" that it used to show...

  8. #8
    Custom User Title tpoynton's Avatar
    Join Date
    Sep 2004
    Location
    Mass
    Posts
    2,177
    Rep Power
    17
    cool - thanks for sharing!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •