Subversion Repositories wimsdev

Rev

Rev 14279 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! +exec+ +var+ +string+
  2. !goto end
  3. tit:mathmlmath
  4. type:$type_both
  5. alias:math2mathml
  6. syntax:!mathmlmath ``expr''
  7. mean:Translate the raw mathematical expression ``expr'', into a form which can be best \
  8.   possibly rendered via mathml tags. The transformations\
  9.   are the same as in htmlmath command and the result is in html if mathml is not available.\
  10.   If the expression is not a "machine-understandable mathematical expression",\
  11.   there is no garanty on the result (today and in the future !).\
  12.   <ul><li>\
  13.   All digits or + or - following a ^ or _ are considered as in exponent/subscript;\
  14.   expression with ( ) following a ^ or _ are  considered as in exponent/subscript;\
  15.   parentheseses are removed (if no sign before) except in case of exponent and only digits.\
  16.   </li><li>\
  17.    Get rid of 1*.. ..*1. example: in 1 * x, x/1, the 1 is removed.\
  18.   </li><li>\
  19.   Replace scientific notation (for example) 35E-05 by 10 power and add multiplication sign. Remove the + or 0 useless.\
  20.   </li><li>\
  21.    Replace some names as greek letters by their equivalents.\
  22.   </li><li>\
  23.    Remove * or replace by multiplication sign.\
  24.   </li><li>\
  25.    Replace <=, >=, ->, =>, <=> by their html/mathml equivalents if possible.\
  26.   </li></ul>
  27.  
  28. sample:see below
  29. :end
  30. <tr>
  31.   <td><code>!mathmlmath 1*x+3*y = 35E-05</code></td>
  32.   <td>
  33.     !mathmlmath 1*x+3*y = 35E-05
  34.   </td>
  35. </tr>
  36. <tr>
  37.   <td><code>!mathmlmath 2x, 2*x</code></td>
  38.   <td>
  39.     !mathmlmath 2x, 2*x
  40.   </td>
  41. </tr>
  42. <tr>
  43.   <td><code>!mathmlmath x2, x_2, x^2</code></td>
  44.   <td>
  45.     !mathmlmath x2, x_2, x^2
  46.   </td>
  47. </tr>
  48.