1
$\begingroup$

I want that mathjax should not write certain equations in new line.

Like if I want to write "The input power Pi is 100W" , then I will write

"The input power is [P_i] is 100W ", But it will output as

OUTPUT:-

The input power \[P_i\] is 100 W

But I want the Pi to be in same line.

$\endgroup$
  • 4
    $\begingroup$ Use $P_i$ for inline math. $\endgroup$ – Stefan Hansen Oct 14 '13 at 9:48
  • $\begingroup$ No it just outputs as it is.I think it may be because I have kept back-slash[ back-slash] for mathjax, and not dollar sign. $\endgroup$ – Santosh Oct 14 '13 at 9:55
5
$\begingroup$

To put Stefan Hansen's comment into practice:


The code The input power is $P_i$ is 100W. outputs

The input power is $P_i$ is 100W.


The code The input power is $$P_i$$ is 100W. outputs

The input power is $$P_i$$ is 100W.


The code The input power is \\[P_i\\] is 100W. outputs

The input power is \[P_i\] is 100W.

$\endgroup$
  • $\begingroup$ ok thanks. Mathjax site told that you must not use dollar sign for latex code because it may get mixed up with \$100 .But for inline latex, I think I have to use $ sign. Am I right? $\endgroup$ – Santosh Oct 14 '13 at 10:08
  • 1
    $\begingroup$ @netdeamon: Sites can customize their $\LaTeX$ delimiters for MathJax processing. According to the MathJax FAQ proper inline math should be delimited with \( ... \), but, alas, it doesn't appear to work here: (P_i) or even \(P_i\) $\endgroup$ – user642796 Oct 14 '13 at 10:15
  • $\begingroup$ @ArthurFischer, The reason that \(...\) are not used on the SE sites is that Markdown uses the backslash as an escape character to prevent the special meaning of the characters that follow. So one could use \[...\] to prevent the brackets from indicating a link, for example. This conflicts with using the LaTeX delimiters \(...\) for in-line math and \[...\] for display math. So they have used the Plain TeX delimiters: $...$ and $$...$$ instead. $\endgroup$ – Davide Cervone Oct 16 '13 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .