jqmath - 自动在数学函数之前/之后添加新行

时间:2016-04-17 15:04:34

标签: javascript html5 jqmath

我正在尝试显示以下行:

<div id="theDiv">
Well, here is the function we have been talking of $$y = ln(e|^[| sin(|x|) |] |)$$ so thats the beauty.
</div>

由于这个div的内容是动态加载的,我申请 M.parseMath(theDiv);

它工作正常,但函数$$ y = ln(e | ^ [| sin(| x |)|] |)$$显示在它自己的新行中。

Well, here is the function we have been talking of 
$$y = ln(e|^[| sin(|x|) |] |)$$ (See this is on a line of its own!)
so thats the beauty.

为什么新行 - 如何避免?

2 个答案:

答案 0 :(得分:2)

在数学周围使用$而不是$$。请参阅http://mathscribe.com/author/jqmath.html

答案 1 :(得分:1)

Dave的意思是使用这样的$ wrappers:

<div id="theDiv">
Well, here is the function we have been talking of $y = ln(e|^[| sin(|x|) |] |)$ so thats the beauty.
</div>