# [SOLVED]Problems in LaTeX

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Today I faced lots of problems in LaTeX it just drove me crazy ...

1- when I preview post a MATH tags just appears from no where in between some code ! ...

2-Some code just stops rendering but when I post it in another compiler it just works fine , but when preveiwing it here , it doesn't work

3-I faced this problem multiple times , what drives me crazy that if I copy and paste the same code to another compiler it works :

$$\displaystyle \int^{\infty}_0\left(e^{-bx}-\frac{1}{1+ax}\right)\,\frac{dx}{x}=\log\left(\frac{a}{b} \right)-\gamma$$

#### Chris L T521

##### Well-known member
Staff member
Today I faced lots of problems in LaTeX it just drove me crazy ...

1- when I preview post a MATH tags just appears from no where in between some code ! ...

2-Some code just stops rendering but when I post it in another compiler it just works fine , but when preveiwing it here , it doesn't work

3-I faced this problem multiple times , what drives me crazy that if I copy and paste the same code to another compiler it works :

$$\displaystyle \int^{\infty}_0\left(e^{-bx}-\frac{1}{1+ax}\right)\,\frac{dx}{x}=\log\left(\frac{a}{b} \right)-\gamma$$
I'm not sure what to say about (1), but for (2) you need to introduce more spacing into your LaTeX code, if I'm not mistaken. I think Ackbach pointed out somewhere that once your string of TeX commands exceeds a certain length without spacing, mathjax doesn't know how to compile it properly. So with enough spacing, I get your example to look like this:

$$\displaystyle \int^{\infty}_0 \left(e^{-bx}- \frac{1}{1+ax}\right) \,\frac{dx}{x} = \log\left(\frac{a}{b} \right)-\gamma$$

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Another problem is that regular text formatting and latex do not work well together.
When you copy+paste latex, there is a tendency that some formatting commands come along, breaking latex.
When replying, click the quick button Switch Editor to Source Mode at the left top.
Then you can see the formatting commands and remove them if necessary.

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
I'm not sure what to say about (1), but for (2) you need to introduce more spacing into your LaTeX code, if I'm not mistaken. I think Ackbach pointed out somewhere that once your string of TeX commands exceeds a certain length without spacing, mathjax doesn't know how to compile it properly. So with enough spacing, I get your example to look like this:

$$\displaystyle \int^{\infty}_0 \left(e^{-bx}- \frac{1}{1+ax}\right) \,\frac{dx}{x} = \log\left(\frac{a}{b} \right)-\gamma$$
I thought this is the problem , but what do you mean by enough spacing ?

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I thought this is the problem , but what do you mean by enough spacing ?
After 50 characters without a space, vBulletin inserts an invisible space for you.
It breaks latex.

MHB Math Helper

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Another problem is that regular text formatting and latex do not work well together.
When you copy+paste latex, there is a tendency that some formatting commands come along, breaking latex.
When replying, click the quick button Switch Editor to Source Mode at the left top.
Then you can see the formatting commands and remove them if necessary.
I've long been searching for that Switch Editor to Source Mode button , could you please upload an image for that ...

#### MarkFL

##### Administrator
Staff member
On the toolbar, it's the button on the left, at the top.

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I've long been searching for that
Switch Editor to Source Mode button , could you please upload an image for that ...

As you can see the quick button at the left top is pressed.
In the reply text you can see for instance [I] now.

#### Jameson

##### Administrator
Staff member
I recommend keeping the editor in the "standard editor" option. If you go to "Settings" -> "General settings" -> "Miscellaneous Options" -> "Message Editor Interface:", you'll see you have 3 choices. It seems like many users choose the "enhanced editor" option but you can do everything with the standard editor that you can with the enhanced and I never have any problems using it. So you can edit your default choice there or you can just push the button that I like Serena pointed out, but I'm not sure that this will stay as the default option. Either way, I definitely recommend the choice where you see each BB code tag.