+ Reply to Thread
Results 1 to 5 of 5

Thread: Math

  1. #1

    Default Math

    Hi everyone,

    I'm trying to get math works

    If I write :

    Code:
    {{ math.formula("\\alpha^2+\\beta^2*\\gamma^3=1") }}
    it does work, but if I write something just a little more complicated, it gives me error :

    Code:
    {{ math.formula("\[\sum\limits_{i = \infty } {\frac{{e^i }}{{ i^i }}}\]") }}
    returns :

    La fonction math.formula a échoué en renvoyant:

    latex failed with status 1:

    ligne 1, colonne 14: ")" expectedligne 1, colonne 2: EOF expected}\]") }}
    To prove there is no error in what I wrote (except this has absolutely no meaning in maths), here it is : http://ohara00.homeftp.net:8080/cgi-...}{{i^i%20}}}\]

    What's wrong ?

    Thank you

  2. #2
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    The problem comes the inner }}, which the parser mistakes for the end of the dekiscript expression.

    Try the following.
    1) switch to HTML mode
    2) find the {{ math.formula("\[\sum\limits_{i = \infty } {\frac{{e^i }}{{ i^i }}}\]") }} text
    3) replace it with <pre class="script">math.formula("\[\sum\limits_{i = \infty } {\frac{{e^i }}{{ i^i }}}\]")</pre>

    This removes the reliance on {{ }} parsing and should fix your issue.

    Alternatively, you can try using spaces between the inner }} double curly braces, like } }. But I don't know if that will change the rendering of your formula.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  3. #3

    Default

    ish that's not very userfriendly.

    Would there be a way for activating it a little bit like BBcodes under phpBB3 (see the post i've done there on this subject).

    example :

    Code:
    [tex] f(x)=\int_{-\infty}^xe^{-t^2}dt [/tex]

  4. #4
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    The way it's supposed to work is that you created a "formatted" area using styles, then you type in your formula, click on "transform content" and select "math.formula".

    1.9.0 missed the mark on that, sadly. It only has syntax transforms.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  5. #5

    Default

    that will be a great feature. Let just wait then.

+ Reply to Thread

Posting Permissions

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