# Write mathjax and text in the same line

This is not duplicated.

I know how to use the $sign, but I want to write long equations and words after in the same line and I don't know how. For example if I write: $$2=1+1=2(0.5+0.5)=\sum_{n=1}^40.5=\sum_{n=1}^21$$this is happening I can't use the$\$ because this will split the output to two different lines.

How can I do that?

• By the way I'm using my smartphone so maybe you can't see the bug... – pgp1 Jan 11 at 21:06
• To be honest, I am not sure what you want it to look like. – Asaf Karagila Jan 11 at 21:23

Use single dollars and \displaystyle and be sure to place spaces outside the dollars:

Text before

If I want to write $$\displaystyle 2=1+1=2(0.5+0.5)=\sum_{n=1}^40.5=\sum_{n=1}^21$$, this is happening but now it looks fine, at least to me, and the paragraph continues neatly.

Text after

That's a feature. The two dollar-sign method is supposed to break the stuff between it onto its own line.

Is this what you're trying to do?

$$2=1+1=2(0.5+0.5)=\sum_{n=1}^40.5=\sum_{n=1}^21\text{this is happening}$$

• I want the text to look like regular text, but basically yes – pgp1 Jan 11 at 21:31