Open SmashManiac opened 6 years ago
I just stumbled upon a case where I can't use metalsmith-katex anymore because the TeX expression \overrightarrow
is not supported by the version of KaTeX bundled with this project even though it is in the latest version, so I can't use vectors in my expressions.
I'm sorry about this. As you may have noticed, this module is not maintained. The latest commit was made in 2015. Maybe it would be better for you to clone this repository and maintain your own version of this module.
Another option is to use an alternative set of Metalsmith plugins. My current setup is based on the following modules:
My build.js
now looks like this:
var markdown = require("metalsmith-markdownit");
var math = require("markdown-it-math");
var katex = require("katex");
var md = markdown("commonmark", { /* options */ });
md.parser.use(math, {
inlineRenderer: str => katex.renderToString(str),
blockRenderer: str => katex.renderToString(str, {displayMode: true});
});
Metalsmith(__dirname)
.use(md)
.build(err => {
if (err) throw err;
});
The version of KaTeX defined in package.json is 0.4.0. The latest version of KaTeX's CSS is not compatible with it however, so following the instructions in README.md causes formulas to not be rendered properly by browsers.
KaTeX dependencies should be updated along with README instructions to ensure compatibility.