Formatting Math Equations (TeX / LaTeX)One of the, perhaps more ominous formatting options is TeX / LaTex which is supported by TNS, as well as many other scientific websites. It allows the formatting of mathematical arguments beyond what you can do with basic superscripts and subscripts, and text characters. For example, one can use mathematical symbols to create fractions, sums, integrals, square roots, cubed roots, vectors, and etc.
Each implementation of TeX may have a few quirks, so I will add a few tricks that I have found useful for working with TeX on TNS, but would encourage each person to experiment to find formats they are comfortable with.
However, once you know a few basic commands and syntax, then it is easy to search on the web for additional, or more specific commands.
To start writing in TeX, you select the
LaTex icon above the edit window.
This will create the basic BB code structure:
[tex]...[/tex]Most of the TeX commands will begin with a backslash
"\", followed by a command such as
frac, followed by one or more arguments in curly brackets
{...}. If it doesn't work, first check that your backslash is going in the right direction
"\", which is opposite than the BB code
[/tex]Ok, say you want to start with a basic fraction, [tex]\frac{x}{y}[/tex].
You find the
\frac TeX function takes two arguments
{numerator}{denominator}.
Put it all together,
[tex]\frac{x}{y}[/tex], and you have your first TeX function [tex]\frac{x}{y}[/tex].
Now, say you wish to do powers. For example, using BB code, you can write
X^{2m} as
X[sup]2m[/sup].
In TeX, the
"^" symbol is used to denote superscripts, and the
"_" symbol to denote subscripts.
So, you put it together, and you end up with:
[tex]X^2m[/tex], and discover that you've failed, ending up with [tex]X^2m[/tex], having lost the m
^{th} power.
To remedy this situation, add an extra set of curly brackets
{} to denote the range that is superscripted.
[tex]X^{2m}[/tex], creating [tex]X^{2m}[/tex].
Now, you can start combing TeX functions. So, if you wanted to combine [tex]X^{2m}[/tex] with the fraction earlier, you just add it to the arguments.
[tex]\frac{X^{2m}}{Y}[/tex], creating [tex]\frac{X^{2m}}{Y}[/tex]
Some of the common TeX functions you may use include (ignoring the BB code)
[tex]...[/tex]Symbol  Function  Example  Produces 
^  Superscript  X^{2m}  [tex]X^{2m}[/tex] 

_  Subscript  H_2O  [tex]H_2O[/tex] 

\frac  Fraction  \frac{x}{y}  [tex]\frac{x}{y}[/tex] 

\sqrt  Square Root  \sqrt{xy}  [tex]\sqrt{xy}[/tex] 

\sqrt  Cubed Root  \sqrt[3]{xy}  [tex]\sqrt[3]{xy}[/tex] 

\sum  Sum  \sum\limits_{i=1}^n {3i}  [tex]\sum\limits_{i=1}^n {3i}[/tex] 

\int  Integral  \int_1^\infty\frac{1}{x^2} dx  [tex]\int_1^\infty\frac{1}{x^2} dx[/tex] 

\vec  Vector  \vec{xy}  [tex]\vec{xy}[/tex] 

\rightharpoon  Vector  \rightharpoon\atop{ab}  [tex]\rightharpoon\atop{ab}[/tex] 

\rightharpoon\atop\leftharpoondown  Equilibrium  A{\rightharpoon\atop\leftharpoondown}B  [tex]A{\rightharpoon\atop\leftharpoondown}B[/tex] 

   

You may have noticed that all of the TeX characters are in script. That may or may not be acceptable for your work. There are a couple of solutions. I often mix TeX and nonTex script together to get the effect that I want.
For example, when writing Helium. [tex]^4_2He[/tex], one might not desire the script, so rather one might choose to write it in mixed text formatting, [tex]^4_2[/tex]He, Tex:
[tex]^4_2[/tex]He.
The Functions,
\mathrm,
\textrm, &
\text in TeX may also create a similar style. However, they can be a bit quirky. With helium, above, one gets
[tex]\text{^4_2He}[/tex], displaying [tex]\text{^4_2He}[/tex], but the vertical spacing is still suboptimal.
Unfortunately, the
\text (and related) functions can create odd results with spaces and repeated characters. You may be able to work around it, but it may also be easier to combine the normal and TeX formatting.
For example, consider Water H
_{2}O, in TeX
[tex]H_2O[/tex], giving [tex]H_2O[/tex]. To attempt to get rid of the script, one might try:
[tex]\text{H_2O}[/tex], producing [tex]\text{H_2O}[/tex], somehow producing a phantom O, and no subscript [xx(]. In an attempt to remedy it, one might try using the
\text command twice,
[tex]\text{H}_2\text{O}[/tex], producing [tex]\text{H}_2\text{O}[/tex], with a good subscript, but an extra space. It does, in fact, produce the desired water molecule when one adds an extra pair of curly brackets
[tex]\text{H{_2}O}[/tex], producing the desired [tex]\text{H{_2}O}[/tex]
Anyway, it never hurts to check your work as you develop your own style.