ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


LaTeX Math Symbols


  • 2007-03-27 08:29:05

    LaTeX Math Symbols

    Can someone help with issuing LaTeX commands in the test question editing block.

    According to my ISP, LaTeX is enabled. I'm sure this is correct because I'm able to use it in Moodle and WordPress.

    The below code(s) have not worked.

    +++++++++++++++
    [tex]
    \begin{displaymath}
    \frac{a^2 - b^2}{a + b} = a - b
    \end{displaymath}
    [/tex]
    +++++++++++++++
    [tex]
    \frac{a^2 - b^2}{a + b} = a - b
    [/tex]
    +++++++++++++++
    [code][tex]
    \begin{displaymath}
    \frac{a^2 - b^2}{a + b} = a - b
    \end{displaymath}
    [/tex][/code]

    +++++++++++++++++

    Thanks,

    Robert

  • 2007-03-27 13:02:59

    Re: LaTeX / Math Symbols

    ATutor does not support LaTeX.

  • 2007-03-27 13:40:48

    Re: LaTeX / Math Symbols

    Is there a specific reason why not (yet)?

    This excludes a lot of folks.

    If I can't write with math symbols, I must keep using / go back to Moodle.

  • 2007-03-27 14:07:40

    Re: LaTeX / Math Symbols

    You are the first to ask for it. It's not really a high demand item.

    We could probably add it without a lot of trouble, but this is a project we would expect a community group to fund. We generally fund features ourselves that others are unlikely to, or features that are in high demand.

    Latex support might cost a few thousand dollars CAD to add, if this something your group might like to raise fund for. As you may be aware, ATutor is all about accessibility, so there will be a little more to it than simple Latex support. Latex math output is not at all accessible.

  • 2007-05-16 01:18:42

    Re: LaTeX / Math Symbols

    I use the wp-latexrender.zip to implement the Math Symbols on
    atutor
    try

    http:/atutor.math.tku.edu.tw/
    or see the scrre shot

    Since I am not a professional programmer, no security is guaranteed .

    1, Download wp-latexrender.zip , extract to /latexender/
    2. modified the path in latex.php
    3. add the following code to /include/lib/output.inc.php

    <?php
    /*
    Plugin Name: LatexRender
    Plugin URI: http://sixthform.info/steve/wordpress/index.php
    Description: Add LaTeX support
    Version: 1.0
    Author: Steve Mayer
    Author URI: http://www.mayer.dial.pipex.com/tex.htm
    */

    function addlatex($latextext) {
    include_once('/usr/local/www/data/latexrender/latex.php');
    //The path depends on your setting
    return latex_content($latextext);
    }



    ?>
    4. add
    $text = addlatex($text);
    after
    function image_replace($text) {
    /* image urls do not require http:// */
    $text = addlatex($text);
    in /include/lib/output.inc.php or anywhere suitable.

  • 2007-05-29 13:33:03

    Re: LaTeX / Math Symbols

    If you want to add LaTeX support quick and easily to atutor you can edit /include/lib/output.inc.php

    and at line:707 add the lines:

    // see: http://www.forkosh.com/mimetex.html
    $input = preg_replace('/\[tex\](.*?)\[\/tex\]/ie', "'<img src=\"http://www.forkosh.dreamhost.com/mimetex.cgi?'.rawurlencode('$1').'\" align=\"middle\">'", $input);

    this will convert all [tex] .. [/tex] to LaTeX using that external host, but i suggest you follow the instructions on that page to install the script locally.