Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Merge requests
  • !806
An error occurred while fetching the assigned milestone of the selected merge_request.

Use ctop.js instead of XSLT in Content MathML extension

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/christianp/ctop into develop 11 years ago
  • Overview 15
  • Commits 6
  • Pipelines 0
  • Changes 2

Created by: christianp

Compare
  • develop (base)

and
  • latest version
    0e0444ec
    6 commits, 2 years ago

2 files
+ 1668
- 78

    Preferences

    File browser
    Compare changes
unpa‎cked‎
extensio‎ns/MathML‎
content-‎mathml.js‎ +1659 -72
jax/inpu‎t/MathML‎
jax‎.js‎ +9 -6
unpacked/extensions/MathML/content-mathml.js
+ 1659
- 72
  • View file @ 0e0444ec

  • Edit in single-file editor

  • Open in Web IDE

Files with large changes are collapsed by default.

unpacked/jax/input/MathML/jax.js
+ 9
- 6
  • View file @ 0e0444ec

  • Edit in single-file editor

  • Open in Web IDE


@@ -36,12 +36,12 @@
MATHML.Parse = MathJax.Object.Subclass({
Init: function (string) {this.Parse(string)},
Init: function (string,script) {this.Parse(string,script)},
//
// Parse the MathML and check for errors
//
Parse: function (math) {
Parse: function (math,script) {
var doc;
if (typeof math !== "string") {doc = math.parentNode} else {
doc = MATHML.ParseXML(this.preProcessMath.call(this,math));
@@ -63,7 +63,9 @@
"MathML must be formed by a <math> element, not %1",
"<"+doc.firstChild.nodeName+">"]);
}
this.mml = this.MakeMML(doc.firstChild);
var data = {math:doc.firstChild, script:script};
MATHML.DOMfilterHooks.Execute(data);
this.mml = this.MakeMML(data.math);
},
//
@@ -238,8 +240,9 @@
MATHML.Augment({
sourceMenuTitle: /*_(MathMenu)*/ ["OriginalMathML","Original MathML"],
prefilterHooks: MathJax.Callback.Hooks(true), // hooks to run before processing MathML
postfilterHooks: MathJax.Callback.Hooks(true), // hooks to run after processing MathML
prefilterHooks: MathJax.Callback.Hooks(true), // hooks to run on MathML string before processing MathML
DOMfilterHooks: MathJax.Callback.Hooks(true), // hooks to run on MathML DOM before processing
postfilterHooks: MathJax.Callback.Hooks(true), // hooks to run on internal jax format after processing MathML
Translate: function (script) {
if (!this.ParseXML) {this.ParseXML = this.createParser()}
@@ -254,7 +257,7 @@
data.math = math; this.prefilterHooks.Execute(data); math = data.math;
}
try {
mml = MATHML.Parse(math).mml;
mml = MATHML.Parse(math,script).mml;
} catch(err) {
if (!err.mathmlError) {throw err}
mml = this.formatError(err,math,script);
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/christianp/ctop

Menu

Explore Projects Groups Snippets