I'm trying to use mathjax-node in javascript.
as you can see in picture, I want to make tex to center not left.
this is rendered picture
is there any configuration on mathjax-node?
I tried text-align and displayAlign to center, but it doesn't worked.
function convert(tex, options, callback) {
mathjax.typeset({
width: options.width,
ex: 10,
math: tex,
format: "TeX",
// style: "text-align: center;",
svg: true, // SVG output
linebreaks: true,
}, function (data) {
if (data.errors) return callback(data.errors);
callback(undefined, data.svg);
});
}
const mathjax = require('mathjax-node');
mathjax.config({
TeX: {
extensions: ["color.js"]
},
MathJax: {
displayAlign: "center",
// 'text-align': "center"
extensions: ["TeX/color.js"],
'fast-preview':{disabled:false}
},
});
mathjax.start();
this is code of mathjax.typeset and config
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…