/itexToMML

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/itexToMML/

« back to all changes in this revision

Viewing changes to plugins/itex2MML/itex2MML.pl

  • Committer: Jacques Distler
  • Date: 2019-01-08 18:52:24 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20190108185224-5w1omf3bxkikgvpa
Ack. Post vanilla version of the MT plugin

Show diffs side-by-side

added added

removed removed

38
38
    $ctx = shift;
39
39
    $_=~ s/\r//g;
40
40
    $_ = number_equations($_, $itex2mml_number_equations, $ctx);
41
 
    my $text = itex_html_filter($_);
42
 
    "<div><a href=\"http://golem.ph.utexas.edu/~distler/blog/mathml.html\" onclick=\"window.open\(this.href, \'MathML\', \'width=310,height=150,scrollbars=no,resizable=yes,status=no\'\); return false;\" onkeypress=\"if\(window.event.keyCode == 13\)\{window.open\(this.href, \'MathML\', \'width=310,height=150,scrollbars=no,resizable=yes,status=no\'\); return false;\}\"><img class=\"mathlogo\" src=\"https://golem.ph.utexas.edu/~distler/blog/images/MathML.png\" alt=\"MathML-enabled post \(click for more details\).\" title=\"MathML-enabled post \(click for details\).\" /></a></div>\n" . $text;
 
41
    itex_html_filter($_);
43
42
}
44
43
 
45
44
sub itexToMMLpara {
48
47
    $_=~ s/\r//g;
49
48
    $_ = number_equations($_, $itex2mml_number_equations, $ctx);
50
49
    $_ = splitparas($_);
51
 
    my $text = itex_html_filter($_);
52
 
    "<div><a href=\"http://golem.ph.utexas.edu/~distler/blog/mathml.html\" onclick=\"window.open\(this.href, \'MathML\', \'width=310,height=150,scrollbars=no,resizable=yes,status=no\'\); return false;\" onkeypress=\"if\(window.event.keyCode == 13\)\{window.open\(this.href, \'MathML\', \'width=310,height=150,scrollbars=no,resizable=yes,status=no\'\); return false;\}\"><img class=\"mathlogo\" src=\"https://golem.ph.utexas.edu/~distler/blog/images/MathML.png\" alt=\"MathML-enabled post \(click for more details\).\" title=\"MathML-enabled post \(click for details\).\" /></a></div>\n" . $text;
 
50
    itex_html_filter($_);
53
51
}
54
52
 
55
53
sub splitparas {