Chemical Forums

General Forums => Comments for Staff and Comments from Staff => Topic started by: Mitch on December 23, 2011, 04:49:34 PM

Title: LaTex on the Forums
Post by: Mitch on December 23, 2011, 04:49:34 PM
If you like to type in LaTex, simply surround your latex with dollar signs like: $ $ Hello World $ $

But make sure to remove the space between the dollar signs.

$$ \mathrm{C}_6\mathrm{H}_{12}\mathrm{O}_6\, +\, 6\mathrm{O}_2 \,\rightarrow\, 6\mathrm{CO}_2\, +\, 6\mathrm{H}_2\mathrm{O} $$

Edit by Borek:

Site uses MathJax now. You can use [tеx][/tеx] tags for LaTeX equations, or [itеx][/itеx] for inline LaTeX:

For a polynomial [itex]ax^2 + bx +c = 0[/itex] roots take form

[tex]x_{1,2} = \frac {-b\pm\sqrt\Delta}{2a}[/tex]

where [itex]\Delta=b^2-4ac[/itex].

For formatting of single exponents and indices it is better to use [sup][/sup] and [sub][/sub] tags.
Title: Re: LaTex on the Forums
Post by: billnotgatez on December 23, 2011, 10:26:17 PM
$$ Hello World $$

OK so i am a smart alec
Title: Re: LaTex on the Forums
Post by: Borek on December 26, 2011, 04:32:08 AM
Off again?
Title: Re: LaTex on the Forums
Post by: Mitch on December 26, 2011, 12:45:14 PM
Seems fine to me, make sure you have javascript enabled.
Title: Re: LaTex on the Forums
Post by: Borek on December 27, 2011, 06:59:47 AM
Strange. I have Java enabled and Mathjax works OK on my computer when I am browsing PF, but it doesn't work on CF. I wonder if it is not another Opera quirk.
Title: Re: LaTex on the Forums
Post by: Mitch on December 27, 2011, 10:06:06 AM
Do you have other browsers installed to check?
Title: Re: LaTex on the Forums
Post by: Borek on December 27, 2011, 10:54:45 AM
Yes, I already checked that it works correctly under Chrome.

To make things more complicated this very thread doesn't display correctly to me when I visit it just following the standard thread link, but LaTeX was rendered right when I started to reply. Most likely it is something on my machine, but I can't reboot now to check if it helps.
Title: Re: LaTex on the Forums
Post by: Mitch on December 27, 2011, 01:30:59 PM
I've also noticed it lags my machine when there is LaTex on the screen. It is why I didn't place any Latex code in my signature as before.
Title: Re: LaTex on the Forums
Post by: Borek on December 27, 2011, 01:39:52 PM
Yes, rendering LaTeX heavy pages can be time consuming, but I think it is worth it. Check for example this LaTeX tutorial (http://www.physicsforums.com/showthread.php?t=546968) that was prepared at PF.
Title: Re: LaTex on the Forums
Post by: juanrga on January 29, 2012, 07:43:38 AM
If you like to type in LaTex, simply surround your latex with dollar signs like: $ $ Hello World $ $

But make sure to remove the space between the dollar signs.

$$ \mathrm{C}_6\mathrm{H}_{12}\mathrm{O}_6\, +\, 6\mathrm{O}_2 \,\rightarrow\, 6\mathrm{CO}_2\, +\, 6\mathrm{H}_2\mathrm{O} $$

.

And for inline math? I have just tried single dollars but does not work

http://www.chemicalforums.com/index.php?topic=55566.msg201162#msg201162
Title: Re: LaTex on the Forums
Post by: Borek on January 29, 2012, 08:38:07 AM
Using single dollar signs is tricky, as they are often used just in text. As forum posts don't follow strict format of LaTeX document, it is impossible for MathJax engine to differentiate between $10 + $20 intended to mean $30, and $10$ that is intended to be an inline formula.

Edit: see http://www.mathjax.org/docs/1.1/tex.html for more details.
Title: Re: LaTex on the Forums
Post by: juanrga on January 29, 2012, 09:17:08 AM
Using single dollar signs is tricky, as they are often used just in text. As forum posts don't follow strict format of LaTeX document, it is impossible for MathJax engine to differentiate between $10 + $20 intended to mean $30, and $10$ that is intended to be an inline formula.

Edit: see http://www.mathjax.org/docs/1.1/tex.html for more details.

Thank you. I tried to modify the post, but passed the time limit. I have submitted another post with the parentheses delimiters and works. Please, feel free to delete the old post containing the dollars signs

http://www.chemicalforums.com/index.php?topic=55566.msg201162#msg201162
Title: Re: LaTex on the Forums
Post by: Borek on May 27, 2012, 02:30:55 PM
http://www.chemicalforums.com/index.php?topic=59314.0