New Feature LaTeX Math & Chemical Typesetting

Tex

O-F Administrator
Administrator
Tutorial Publisher
Joined
Oct 16, 2007
Messages
6,565
Reaction score
15
Points
0
Location
Houston
Website
akademeiascrolls.blogspot.com
Orbiter-Forum is proud to introduce the addition of LaTeX mathematical typesetting to our forum software! Special thanks to Vash for getting it all installed on the server for us!

LaTeX is a professional-grade general typesetting system that centers around very pleasing mathematical presentation. Mathematical expressions are written in a markup style somewhat similar to HTML.

To include a LaTeX graphic, simply type your LaTeX code between math bbcode tags.

[math]enter code here[/math]


For example, the code
HTML:
[math]a^x_n[/math]
produces the graphic: [math]a^x_n[/math]


Mathematical LaTeX Examples

[math]\frac{1}{2}[/math]

[math]R^a{}_{bcd}[/math]

[math]\nabla \times C[/math]

[math]\lambda_j = \mathbf{\lambda} \cdot \mathbf{e}_j[/math]

[math]v(t) = v_0 + \frac{1}{2} a t^2[/math]

[math]\gamma \equiv \frac{1}{\sqrt{1 - v^2/c^2}}[/math]

[math]e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n[/math]

[math]\iiint f(x,y,z)\,dx\,dy\,dz[/math]

[math]A \alpha B \beta \Gamma \gamma \Delta \delta \dots \Phi \phi X \chi \Psi \psi \Omega \omega[/math]

[math]\Gamma^l_{ki} = \frac{1}{2} g^{lj} (\partial_k g_{ij} + \partial_i g_{jk} - \partial_j g_{ki})[/math]



Chemical LaTeX Examples
To explain the basics:
_ is subscript
^ is superscript
{} are delimiters, to keep text together
~ is a space
[math]^{33}_{17}Cl^{16}\xrightarrow{n,n}~^{31}_{15}P^{16 }+~^4_2He^2[/math]

[math]pH=pK_a+log\frac{[A^-]}{[HA]}[/math]

[math]V=\frac{k_2[E]_t}{K_M+}[/math]

[math]6CO_2+6H_2O\xrightarrow{Light~Energy}C_6H_{12}O_6+ CO_2~~~\Delta G^\circ=+2870kJ/mol[/math]


*Click on each of the examples above to "learn by example."

Good luck and enjoy the system!
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,352
Reaction score
17
Points
113
Location
Sydney, Australia
You guys just keep making it better and better.

For anyone that finds entering the LaTeX source code tiresome, I use a WYSIWYG* editor called LyX and you can just copy the code into the [math] tags. I'm sure you could do the same from other editors too.

* Actually, they call it WYSIWYM (What You See Is What You Mean) since it is not quite WYSIWYG. Nonetheless, I find it a lot easier than writing LaTeX code in a text editor.

EDIT: Only problem is that it doesn't support \LaTeX{} :p

EDIT2: I see it does, you just don't require the backslash in front of the function name: [math]LaTeX{}[/math][/math]
 

insanity

Blastronaut
Donator
Joined
Jun 22, 2009
Messages
1,193
Reaction score
106
Points
63
Location
Oakland, CA
Excellent! This is a super-handy upgrade. Cheers for the great work!
 

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
1,865
Reaction score
228
Points
63
Location
Biddeford ME
Website
www.adabsurdumpublishing.com
Wahooooooooooo!!!!!!!!!

This is much better then writing averthing on one line

[math] \iint (1-x)^2 + 100(y-x^2)^2\,dx\,dy [/math]

integration of the Rosenbrock function

Thanks tex.
 
Last edited:

agentgonzo

Grounded since '09
Addon Developer
Joined
Feb 8, 2008
Messages
1,659
Reaction score
4
Points
0
Location
Hampshire, UK
Website
orbiter.quorg.org
I never got around to learning [math]LaTeX{}[/math] and am still a bit sad that I never got to use it - especially as I was doing a maths degree at uni. The amount of printed material that I had to produce was minimal, so it just wasn't worth it in the end.
 

eveningsky339

Resident Orbiter Slave
Addon Developer
Donator
Joined
May 3, 2008
Messages
1,063
Reaction score
0
Points
0
Location
Western Maine
Whoa, this is awesome! I'm going to have fun with this...

Thank you Vash and Tex for implementing this feature. :thumbup:
 

TSPenguin

The Seeker
Joined
Jan 27, 2008
Messages
4,081
Reaction score
4
Points
0
How about installing TeX fonts instead of having the output in images?

Would simply not work. Everyone would need to install them. And even then, how would the symbols be positioned accurately in every browser?
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,349
Reaction score
17
Points
0
Website
orbit.medphys.ucl.ac.uk
Excellent news! This is a really useful addition to the forum. Finally we can do proper equations, rather than writing everything in pseudocode! It's a shame that html doesn't support proper typesetting natively, but the bitmaps are a good enough for all purposes I can think of (this is the same method that doxygen uses to put equations into its html pages).
 

Jarvitä

New member
Joined
Aug 5, 2008
Messages
2,030
Reaction score
0
Points
0
Location
Serface, Earth
Would simply not work. Everyone would need to install them. And even then, how would the symbols be positioned accurately in every browser?

Works OK on some of the forums I visit, and those who don't feel the need to install them can still default to the image printouts.
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,283
Reaction score
17
Points
0
Location
Florida
Thanks for the addition. Can someone point me to the proof of:
[math]

e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n
[/math]
?
 

insanity

Blastronaut
Donator
Joined
Jun 22, 2009
Messages
1,193
Reaction score
106
Points
63
Location
Oakland, CA
Now I want to build a sugar rocket in a [math]12in*.75in[/math] tube. How much of the reagents will I need?
[math]
\\Volume\\
v=\pi r^2h
[/math]
[math]
r=.75in\frac{2.54cm}{1in}\approx 1.905cm
[/math]
[math]
h=12in\frac{2.54cm}{1in}\approx 30.48cm
[/math]
[math]
v\approx 347.5cm^3
[/math]
Chemical Equation
[math]
5C_{12}H_{22}O_{11}+ 48KNO_{3}= 24K_{2}CO_{3}+36CO_{2}+55H_{2}O+24N_{2}
[/math]
Now, to fill the volume with the product:
[math]
347.5cm^3 K_2CO_3 \frac {2.29gK2CO_3}{1cm^3K2CO_3}=795.78gK_2CO_3
[/math]
Now to solve the problem for reagents needed!
[math]
795.78gK_2CO_3 \frac {1molK_2CO_3}{138.205gK2CO_3}\frac{48molKNO_3}{24molK_2CO_3}\frac{101.103gKNO_3}{1molKNO3}=1164gKNO_3
[/math]
[math]
1164gKNO_3\frac{1molKNO3}{101.103gKNO3}\frac{5molSugar}{48molKNO_3}\frac{342.3g\:sugar}{1mol\:sugar}=410.51g\:Sugar
[/math]

Oooh, pretty equations!
 
Last edited:

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,786
Reaction score
0
Points
36
I noticed the math button is gone with the new editor... can we get that back, please? :)
 

Tex

O-F Administrator
Administrator
Tutorial Publisher
Joined
Oct 16, 2007
Messages
6,565
Reaction score
15
Points
0
Location
Houston
Website
akademeiascrolls.blogspot.com
:hmm: There was a math button? I didn't think we had one, you just had to manually type math in bb code brackets.
 
Top