0
我想在Flot的轴标签中渲染LaTeX。它的工作原理,因为这是在我的头执行这个page第一经过:MathJax在Flot的轴标签中
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [["$", "$"], ["\\(", "\\)"]]}
});
</script>
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
但是,用户必须输入缺省值以外的新的参数,并通过<input type="button" value="Evaluate" onclick="discrete()">
执行JS的选项。这是一个在这一点上,MathJax无法“看到”发生了什么事在discrete.js
末:
MathJax.Hub.Config({//needed?
tex2jax: {inlineMath: [["$", "$"], ["\\(", "\\)"]]}
});
function doPlot(position) {//Flot
$.plot("#placeholder", [//data
{ data: z_m_plot }
],//options
{
series: {
points: {
radius: 3,
show: true,
fill: true,
fillColor: "navy"
},
color: "navy"
},
xaxis: { axisLabel: "$z_{max}(j - 1)$" },
yaxis: { axisLabel: "$z_{max}(j)$" }
}
);
}
doPlot("left");
有没有办法通过各个字符串MathJax以呈现轴标签$z_{max}(j - 1)$
和$z_{max}(j)$
?
注:cdn.mathjax.org接近其结束生命,检查https://www.mathjax.org/迁移技巧的cdn-shut-down(也许更新您的答案为未来的读者)。 – 2017-04-21 07:18:06