### Welcome to our community

#### Chris L T521

##### Well-known member
Staff member
$\int_0^{\infty}e^{-x^2}\,dx=\frac{\sqrt{\pi}}{2}$

This is inline: $$\frac{\sqrt{b^2-4ac}}{2a}$$

Other centered equation

$$\Gamma(x)=\int_0^{\infty}e^{-t}t^{x-1}\,dt$$

Last edited:

#### The Chaz

##### Member
So LaTex in brackets is centered? Not sure I get the syntax, though I'm trying to scroll through it on the mobile...

#### Ackbach

##### Indicium Physicus
Staff member
So \ ( and \ ), with no spaces, gives you inline. \ [ and \ ], with no spaces, gives you displayed. $$x^{2}+4x-4=0$$, but $x^{2}+4x-4=0.$

The first is inline, the second displayed.

#### Prove It

##### Well-known member
MHB Math Helper
How odd. I was able to do centred fine using the dollar signs, but the others wouldn't work...

#### Ackbach

##### Indicium Physicus
Staff member
How odd. I was able to do centred fine using the dollar signs, but the others wouldn't work...
Yeah, it looks like the double-dollar signs are enabled for displayed equations, but the single are not enabled for inline, although MathJax is capable of doing those as well. Chris mentioned to me in an email that the reason for that is there are quite a few algebra problems concerning money, and newbies would have a hard time escaping those characters.

#### ThePerfectHacker

##### Well-known member
$$\Gamma(x)=\int_0^{\infty}e^{xt}t^{x-1}\,dt$$
Apparently LaTeX does not check for math mistakes.

#### Prove It

##### Well-known member
MHB Math Helper
Yeah, it looks like the double-dollar signs are enabled for displayed equations, but the single are not enabled for inline, although MathJax is capable of doing those as well. Chris mentioned to me in an email that the reason for that is there are quite a few algebra problems concerning money, and newbies would have a hard time escaping those characters.
I actually meant starting with the square and round brackets didn't work. Maybe I wasn't doing it right...

Test: $$(a + b)^n = \sum_{r = 0}^n {n\choose{r}}a^{n-r}b^r$$

$\lim_{h \to 0}\frac{\sin{h}}{h} = 1$

Hmm, now it works ><

#### CaptainBlack

##### Well-known member
Test:

Some text then inline $$f(x)=\sin(x^2/23)$$ OK

$f(x)=\frac{1}{\sin(x)}$ OK

$$\displaystyle f(x)=\frac{1}{\sin(x)}$$.....$$f(x)=\frac{1}{\sin(x)}$$ - just messing with the inline form

more text.

The thing that I don't like about the MathJax \ [ ... \ ] delimiters is the amount of white space inserted before and after the LaTeX

Note the [ noparse] [ /noparse] taggs are not working

CB

#### Chris L T521

##### Well-known member
Staff member
Test:

Some text then inline $$f(x)=\sin(x^2/23)$$ OK

$f(x)=\frac{1}{\sin(x)}$ OK

$$\displaystyle f(x)=\frac{1}{\sin(x)}$$.....$$f(x)=\frac{1}{\sin(x)}$$ - just messing with the inline form

more text.

The thing that I don't like about the MathJax \ [ ... \ ] delimiters is the amount of white space inserted before and after the LaTeX

Note the [ noparse] [ /noparse] taggs are not working

CB
Since this being called from the MathJax js file, there was no need to create a BBcode for it. Hence, noparse will have no effect on it.

#### Ackbach

##### Indicium Physicus
Staff member
Since this being called from the MathJax js file, there was no need to create a BBcode for it. Hence, noparse will have no effect on it.
So question: how do we output raw LaTeX code? Verbatim?

#### Chris L T521

##### Well-known member
Staff member
So question: how do we output raw LaTeX code? Verbatim?
It turns out you can do that using the code tags. For example,

Code:
$\displaystyle\int_{\partial M} \omega$
would compile to $$\large{\displaystyle{\int_{\partial M} \omega}}$$.

Last edited by a moderator:

#### sbhatnagar

##### Active member
Writing Inline LaTeX

LaTeX without "\displaystyle"

Code:\int_{0}^{\infty}\frac{\ln(x)}{(x-a)(x-b)}dx

$$\int_{0}^{\infty}\frac{\ln(x)}{(x-a)(x-b)}dx$$

LaTeX with "\displaystyle"

Code:\displaystyle \int_{0}^{\infty}\frac{\ln(x)}{(x-a)(x-b)}dx

$$\displaystyle \int_{0}^{\infty}\frac{\ln(x)}{(x-a)(x-b)}dx$$

#### Markov

##### Member
Re: Writing Inline LaTeX

I just realized the LaTeX is showing itself nicely! That's good.

Perhaps a little suggestion: I love to render LaTeX by using the dollar sign, but, is there a way to render fractions, sums, integrals, etc by not using \displaystyle? It's annoying to write it everytime!

#### Ackbach

##### Indicium Physicus
Staff member
Re: Writing Inline LaTeX

Try double-dollar signs (two to open, two to close).

#### Markov

##### Member
Re: Writing Inline LaTeX

Well it didn't work that well, because by using doble dollar sign, it will center the content, and I don't always need to center the content.

#### afwings

##### New member
Just thought I'd test out some things too. Here's an inline equation $$u = \phi \cdot \exp \left\{ {{\textstyle{1 \over 2}}\sigma \left( {x + y} \right)} \right\}$$ and here's a display (centered) equation ${\rm{Bond Value}} = {\rm{C}}\left[ {\frac{{1 - \frac{1}{{{{\left( {1 + {\rm{r}}} \right)}^{\rm{t}}}}}}}{{\rm{r}}}} \right] + \frac{{{\rm{FV}}}}{{{{\left( {1 + {\rm{r}}} \right)}^{\rm{t}}}}}$
So, how'd that work out?

#### afwings

##### New member
Just thought I'd test out some things too. Here's an inline equation $$u = \phi \cdot \exp \left\{ {{\textstyle{1 \over 2}}\sigma \left( {x + y} \right)} \right\}$$ and...
Ok, that's something I just noticed -- following the MathJax close delimiter -- \) -- even if I add a space, the space doesn't show up in the post. Wonder what happens if I add 2 spaces? Here's a shot at it: $${b^2} - 4ac % MathType!MTEF!2!1!+- % feaagGart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbdfgBPj % MCPbqedmvETj2BSbqefm0B1jxALjhiov2DGCKCLv2AGW0B3bqefqvA % Tv2CG4uz3bIuV1wyUbqee0evGueE0jxyaibaieYhf9irFfeu0dXdh9 % vqqj-hEeeu0xXdbba9frFj0-OqFfea0dXdd9vqai-hGuQ8kuc9pgc9 % q8qqaq-dir-f0-yqaiVgFr0xfr-xfr-xb9adbaqaaeGaciGaaiaabe % qaamaaeaqbaaGcbaGaamOyamaaCaaaleqabaGaaGOmaaaakiabgkHi % TiaaisdacaWGHbGaam4yaaaa!4201!$$ ok, I added 2 spaces, and still one showed up. Nice to know. (If it's already been pointed out, sorry I missed it.)

Trying something else. Here's a simple matrix: $\left[ {\begin{array}{*{20}{c}}{10}&{20}\\{30}&4\end{array}} \right] % MathType!MTEF!2!1!+- % feaagGart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbdfgBPj % MCPbqedmvETj2BSbqefm0B1jxALjhiov2DGCKCLv2AGW0B3bqefqvA % Tv2CG4uz3bIuV1wyUbqee0evGueE0jxyaibaieYhf9irFfeu0dXdh9 % vqqj-hEeeu0xXdbba9frFj0-OqFfea0dXdd9vqai-hGuQ8kuc9pgc9 % q8qqaq-dir-f0-yqaiVgFr0xfr-xfr-xb9adbaqaaeGaciGaaiaabe % qaamaaeaqbaaGcbaWaamWaaeaafaqabeGacaaabaGaaGymaiaaicda % aeaacaaIYaGaaGimaaqaaiaaiodacaaIWaaabaGaaGinaaaaaiaawU % facaGLDbaaaaa!43CF!$

#### Jameson

Staff member
I'm not following what's going on in the matrix you made. Is that the intended output or did something go wrong?

#### afwings

##### New member
I'm not following what's going on in the matrix you made. Is that the intended output or did something go wrong?
Jameson, thanks for following up on that. There are really 2 issues shown in my post, neither of which I believe to be MHB's error.

1. When viewing the forum in FF16 for Windows (and only in that configuration), the character immediately following an inline equation rendered by MathJax overlaps the right edge of the equation. If a period follows the equation, the period ends up inside the equation, like this one (again, this effect only happens on Windows, only in Firefox, and only with Math Renderer > MathML): $$\left( {x,y} \right) % MathType!MTEF!2!1!+- % feaagGart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbdfgBPj % MCPbqedmvETj2BSbqefm0B1jxALjhiov2DGCKCLv2AGW0B3bqefqvA % Tv2CG4uz3bIuV1wyUbqee0evGueE0jxyaibaieYhf9irFfeu0dXdh9 % vqqj-hEeeu0xXdbba9frFj0-OqFfea0dXdd9vqai-hGuQ8kuc9pgc9 % q8qqaq-dir-f0-yqaiVgFr0xfr-xfr-xb9adbaqaaeGaciGaaiaabe % qaamaaeaqbaaGcbaWaaeWaaeaacaWG4bGaaiilaiaadMhaaiaawIca % caGLPaaaaaa!40E2!$$. I've filed this as a MathJax bug, but it may be a Firefox bug. There are other things going on in Firefox 16. (And it may already be corrected; hard to tell.)
2. The second issue is related to how MathType codes matrices with the Math Help Boards translator, which will be added to Cut & Copy Preferences when MathType 6.9 is released (no projected release date yet). We've already corrected this.

Bob

#### Jameson

Staff member
Hi Bob,

Glad it's all working then. I notice in your post how a long string of code renders a very short $$\displaystyle \left( {x,y} \right)$$. I'm guessing this is part of the Math Type plugin?

Anyway, it sounds like you're more than on top of things so I won't ask you to explain it all to me. Just let me know if there's anything I can do and if any of the issues are on our end

Best,
Jameson

#### Jay

##### New member
So question: how do we output raw LaTeX code? Verbatim?

You insert LaTeX code verbatim like this using CODE and /CODE tags enclosed within square brackets. Everything between the tags will be listed verbatim.

Code:
$$X = \sum_{n=0}^5\left(\left(\sum_{j=1}^k A_{X,n,j} \cdot {cos(B_{X,n,j} + t \cdot C_{X,n,j})}\right) \cdot t^n\right)$$

which means:
$$X = \sum_{n=0}^5\left(\left(\sum_{j=1}^k A_{X,n,j} \cdot {cos(B_{X,n,j} + t \cdot C_{X,n,j})}\right) \cdot t^n\right)$$

Last edited: