Search code examples
javascripthtmljqmath

jqmath - new line added before/after the math function automatically


I am trying to display the following line:

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

Since the contents of this div is loaded dynamically, i apply M.parseMath(theDiv);

It works fine, but the function $$y = ln(e|^[| sin(|x|) |] |)$$ is being displayed in a new line of its own.

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.

Why the new line - how to avoid that?


Solution

  • Use $ instead of $$ around your math. See http://mathscribe.com/author/jqmath.html.