Rev 8499 | Rev 8649 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8499 | Rev 8500 | ||
---|---|---|---|
Line 479... | Line 479... | ||
479 | char *p2, *p3, *pp; |
479 | char *p2, *p3, *pp; |
480 | char c; |
480 | char c; |
481 | p3 = p2 = find_word_start(p1+1); |
481 | p3 = p2 = find_word_start(p1+1); |
482 | if(*p2=='+' || *p2=='-') p2++; |
482 | if(*p2=='+' || *p2=='-') p2++; |
483 | p2 = find_word_start(p2); |
483 | p2 = find_word_start(p2); |
484 | /* jm.evers 31.1.2014 |
- | |
485 |
|
484 | /* add '}' to recognized parenthesis in exponent |
486 | * !mathmlmath 2 \cdot x^{3} will now produce correct exponent... |
485 | * !mathmlmath 2 \cdot x^{3} will now produce correct exponent... |
487 | * !mathmlmath should convert LaTeX input into correct MathML |
486 | * !mathmlmath should convert LaTeX input into correct MathML |
488 | */ |
487 | */ |
489 | if(*p2=='(' || *p2 == '{') { /* ^[+-]( */ |
488 | if(*p2=='(' || *p2 == '{') { /* ^[+-]( */ |
490 | if(*p2 == '('){ p2 = find_matching(p2+1,')');}else { if(*p2 == '{'){ p2 = find_matching(p2+1,'}');}} |
489 | if(*p2 == '('){ p2 = find_matching(p2+1,')');}else { if(*p2 == '{'){ p2 = find_matching(p2+1,'}');}} |
Line 785... | Line 784... | ||
785 | 784 | ||
786 | /* if mathml is closed, it will be just htmlmath*/ |
785 | /* if mathml is closed, it will be just htmlmath*/ |
787 | 786 | ||
788 | void mathmlmath(char *p) |
787 | void mathmlmath(char *p) |
789 | { |
788 | { |
790 | /* |
789 | /* |
791 | if force_mathml variable is set to "yes", do not (never) use 'htmlmath' |
790 | if force_mathml variable is set to "yes", do not (never) use 'htmlmath' |
792 | so |
791 | in output, so command: !mathmlmath some_LaTeX_string will produce mathml |
793 | |
792 | (mathml \input inputfields may be included) |
794 | */ |
793 | */ |
795 | if( strcmp( getvar("force_mathml"),"yes") == 0 ){ mathalign_base = 2;mathml(p,1);return; } |
794 | if( strcmp( getvar("force_mathml"),"yes") == 0 ){ mathalign_base = 2;mathml(p,1);return; } |
796 | if (mathalign_base == 2) { __htmlmath(p,0) ; mathml(p,1);} else { __htmlmath(p,1) ;} |
795 | if (mathalign_base == 2) { __htmlmath(p,0) ; mathml(p,1);} else { __htmlmath(p,1) ;} |
797 | } |
796 | } |