mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 13:38:39 +00:00
Adds MathML support for math font commands.
This is part 3 or 3. The first two pull requests added font metrics, HTML rendering, and screenshot tests.
This commit is contained in:
committed by
Kevin Barabash
parent
1b5834d894
commit
64e63d7546
@@ -5,7 +5,6 @@
|
||||
* called, to produce a final HTML tree.
|
||||
*/
|
||||
|
||||
var Options = require("./Options");
|
||||
var ParseError = require("./ParseError");
|
||||
var Style = require("./Style");
|
||||
|
||||
@@ -1281,22 +1280,11 @@ var buildGroup = function(group, options, prev) {
|
||||
* Take an entire parse tree, and build it into an appropriate set of HTML
|
||||
* nodes.
|
||||
*/
|
||||
var buildHTML = function(tree, settings) {
|
||||
var buildHTML = function(tree, options) {
|
||||
// buildExpression is destructive, so we need to make a clone
|
||||
// of the incoming tree so that it isn't accidentally changed
|
||||
tree = JSON.parse(JSON.stringify(tree));
|
||||
|
||||
var startStyle = Style.TEXT;
|
||||
if (settings.displayMode) {
|
||||
startStyle = Style.DISPLAY;
|
||||
}
|
||||
|
||||
// Setup the default options
|
||||
var options = new Options({
|
||||
style: startStyle,
|
||||
size: "size5"
|
||||
});
|
||||
|
||||
// Build the expression contained in the tree
|
||||
var expression = buildExpression(tree, options);
|
||||
var body = makeSpan(["base", options.style.cls()], expression);
|
||||
|
Reference in New Issue
Block a user