You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
771 B
36 lines
771 B
var katex = require("katex");
|
|
|
|
module.exports = {
|
|
book: {
|
|
assets: "./static",
|
|
js: [],
|
|
css: [
|
|
"katex.min.css"
|
|
]
|
|
},
|
|
ebook: {
|
|
assets: "./static",
|
|
css: [
|
|
"katex.min.css"
|
|
]
|
|
},
|
|
blocks: {
|
|
math: {
|
|
shortcuts: {
|
|
parsers: ["markdown", "asciidoc", "restructuredtext"],
|
|
start: "$$",
|
|
end: "$$"
|
|
},
|
|
process: function(blk) {
|
|
var tex = blk.body;
|
|
var isInline = !(tex[0] == "\n");
|
|
var output = katex.renderToString(tex, {
|
|
displayMode: !isInline
|
|
});
|
|
|
|
return output;
|
|
}
|
|
}
|
|
}
|
|
};
|