Well, here is the function we have been talking of $$y = ln(e|^[| sin(|x|) |] |)$$ so tha" /> Well, here is the function we have been talking of $$y = ln(e|^[| sin(|x|) |] |)$$ so tha" /> Well, here is the function we have been talking of $$y = ln(e|^[| sin(|x|) |] |)$$ so tha"/>

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

226 Views Asked by At

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?

2

There are 2 best solutions below

0
Dave Barton On BEST ANSWER

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

0
YakovL On

What Dave means is use $ wrappers like this:

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