Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3264b15
Fix missing factor of 1000 for lineWidth, and allow dpi to be compute…
dpvc Feb 4, 2015
aa15fbe
Make cwidth be in units of em*1000 rather than px. Resolves issue #65.
dpvc Feb 4, 2015
43937d2
Make the same adjustements to mj-page.js. Issues #62 and #65.
dpvc Feb 5, 2015
b04a246
Merge branch 'issue62' into develop. Issues #62 and #65.
dpvc Feb 6, 2015
696438c
Update for #64
pkra Feb 6, 2015
4198ca6
Merge pull request #68 from mathjax/issue64-1
dpvc Feb 10, 2015
4fa4927
Update version number and fix some spacing
dpvc Feb 10, 2015
1346ceb
Fix AddError() to handle errors with no prefixes.
dpvc Feb 11, 2015
c9c691b
Add error if MathJax doesn't load.
dpvc Feb 11, 2015
cb689f5
Work around bug in node's url.resolve that damages file:// URLs when …
dpvc Feb 11, 2015
487d655
Fix use of options to jsdom calls. (Is this changed from jsdom 1.0.2…
dpvc Feb 11, 2015
af95c00
Move to jsdom 3.1.1 (current latest version)
dpvc Feb 11, 2015
8fc997b
Use OS temp directory os.tmpdir() rather than hard-coded /tmp
sammarshallou Feb 12, 2015
c6a12cb
Changed Batik calls to use execFile instead of exec
sammarshallou Feb 12, 2015
3ca651a
Fix MathJax.js URL to work with Windows. Resolves issue #70.
dpvc Feb 14, 2015
524458c
Allow extensions to be specified on command line
sammarshallou Feb 13, 2015
0e8143e
Update mathjax branch to 2.5.1
pkra Mar 19, 2015
2ea8a64
Merge pull request #73 from sammarshallou/UseProperTempFolder
dpvc Mar 20, 2015
cf49284
Merge pull request #74 from sammarshallou/BatikExecQuoting
dpvc Mar 20, 2015
209e09d
Merge pull request #75 from sammarshallou/AllowExtensions
dpvc Mar 20, 2015
0b4b10f
Compensate for removed MathEvents.js. Resolves issues #85, #66, and …
dpvc Mar 30, 2015
a143e39
Merge pull request #86 from mathjax/issue85
pkra Apr 1, 2015
0ba92ef
Update installation instructions (to use npm)
pkra Apr 1, 2015
09f85fc
Update Batik instructions
pkra Apr 1, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ of calling the MathJax API.

Use

npm install https://github.com/mathjax/MathJax-node/tarball/master
npm install MathJax-node

to install MathJax-node and its dependencies.

Expand Down
4 changes: 3 additions & 1 deletion batik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ If you intend to use MathJax-node's ability to create PNG images, you
should install [batik](http://xmlgraphics.apache.org/batik/download.html)
in this directory. Just download it and unpack it here. You need
`batik-rasterizer.jar` and the `lib` directory to be in the top level
of this directory.
of this directory. Since Batik v1.8 you have to either create a symlink
to `batik-rasterizer-1.8.jar` or change `mj-page.js` and `mj-single.js`
to point to the version-specific file name.
7 changes: 6 additions & 1 deletion bin/am2mml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ var argv = require("yargs")
semantics: {
boolean: true,
describe: "add AsciiMath code in <semantics> tag"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;
Expand All @@ -52,7 +56,8 @@ mjAPI.config({
menuSettings: {
semantics: argv.semantics
}
}
},
extensions: argv.extensions
});
mjAPI.start();

Expand Down
12 changes: 9 additions & 3 deletions bin/am2png
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ var argv = require("yargs")
describe: "perform automatic line-breaking"
},
dpi: {
default: 144,
describe: "dpi for image"
default: 0,
describe: "dpi for image (0 = calculate automatically)"
},
font: {
default: "TeX",
Expand All @@ -48,14 +48,20 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

if (argv.dpi === 0) {argv.dpi = argv.ex * 16} // pixels properly sized

mjAPI.typeset({
math: argv._[0],
format: "AsciiMath",
Expand Down
6 changes: 5 additions & 1 deletion bin/am2svg
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

mjAPI.typeset({
Expand Down
6 changes: 5 additions & 1 deletion bin/mml2mml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ var argv = require("yargs")
speechstyle: {
default: "default",
describe: "style to use for speech text (default, brief, sbrief)"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

mjAPI.config({});
mjAPI.config({extensions: argv.extensions});
mjAPI.start();

mjAPI.typeset({
Expand Down
12 changes: 9 additions & 3 deletions bin/mml2png
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ var argv = require("yargs")
describe: "perform automatic line-breaking"
},
dpi: {
default: 144,
describe: "dpi for image"
default: 0,
describe: "dpi for image (0 = calculate automatically)"
},
font: {
default: "TeX",
Expand All @@ -47,14 +47,20 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

if (argv.dpi === 0) {argv.dpi = argv.ex * 16} // pixels properly sized

mjAPI.typeset({
math: argv._[0],
format: "MathML",
Expand Down
6 changes: 5 additions & 1 deletion bin/mml2svg
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

mjAPI.typeset({
Expand Down
6 changes: 5 additions & 1 deletion bin/mml2svg-html5
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

//
Expand Down
8 changes: 6 additions & 2 deletions bin/page2mml
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,24 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

argv.format = argv.format.split(/ *, */);

mjAPI.config({MathJax: {menuSettings: {semantics: argv.semantics}}});
mjAPI.config({MathJax: {menuSettings: {semantics: argv.semantics}}, extensions: argv.extensions});
mjAPI.start();

//
// Process an HTML file:
//
function processHTML(html,callback) {
var document = jsdom(html,null,{features:{FetchExternalResources: false}});
var document = jsdom(html,{features:{FetchExternalResources: false}});
var xmlns = getXMLNS(document);
mjAPI.typeset({
html:document.body.innerHTML,
Expand Down
18 changes: 12 additions & 6 deletions bin/page2png
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ var argv = require("yargs")
describe: "equation number style (none, AMS, or all)"
},
img: {
default: "",
describe: "make external svg images with this name prefix"
default: "",
describe: "make external svg images with this name prefix"
},
dpi: {
default: "144",
describe: "the dpi for the PNG images"
default: 0,
describe: "dpi for image (0 = calculate automatically)"
},
font: {
default: "TeX",
Expand All @@ -83,20 +83,26 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

argv.format = argv.format.split(/ *, */);
if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

if (argv.dpi === 0) {argv.dpi = argv.ex * 16} // pixels properly sized

//
// Process an HTML file:
//
function processHTML(html,callback) {
var document = jsdom(html,null,{features:{FetchExternalResources: false}});
var document = jsdom(html,{features:{FetchExternalResources: false}});
var xmlns = getXMLNS(document);
mjAPI.typeset({
html: document.body.innerHTML,
Expand Down
8 changes: 6 additions & 2 deletions bin/page2svg
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,24 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

argv.format = argv.format.split(/ *, */);
if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

//
// Process an HTML file:
//
function processHTML(html,callback) {
var document = jsdom(html,null,{features:{FetchExternalResources: false}});
var document = jsdom(html,{features:{FetchExternalResources: false}});
var xmlns = getXMLNS(document);
mjAPI.typeset({
html: document.body.innerHTML,
Expand Down
7 changes: 6 additions & 1 deletion bin/tex2mml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ var argv = require("yargs")
notexhints: {
boolean: true,
describe: "don't add TeX-specific classes"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;
Expand All @@ -61,7 +65,8 @@ mjAPI.config({
semantics: argv.semantics,
texHints: !argv.notexhints
}
}
},
extensions: argv.extensions
});
mjAPI.start();

Expand Down
12 changes: 9 additions & 3 deletions bin/tex2png
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ var argv = require("yargs")
describe: "perform automatic line-breaking"
},
dpi: {
default: 144,
describe: "dpi for image"
default: 0,
describe: "dpi for image (0 = calculate automatically)"
},
font: {
default: "TeX",
Expand All @@ -52,14 +52,20 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

if (argv.dpi === 0) {argv.dpi = argv.ex * 16} // pixels properly sized

mjAPI.typeset({
math: argv._[0],
format: (argv.inline ? "inline-TeX" : "TeX"),
Expand Down
6 changes: 5 additions & 1 deletion bin/tex2svg
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

mjAPI.typeset({
Expand Down
6 changes: 5 additions & 1 deletion bin/tex2svg-filter
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ var argv = require("yargs")
width: {
default: 100,
describe: "width of container in ex"
},
extensions: {
default: "",
describe: "extra MathJax extensions e.g. 'Safe,TeX/noUndefined'"
}
})
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}});
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.start();

var prefix = argv._[0]; // the file prefix
Expand Down
Loading