Chemical LaTeX typeset

  • Thread starter Monique
  • Start date
  • #1
Monique
Staff Emeritus
Science Advisor
Gold Member
4,217
66
Physicsforums now has a very cool feature, which enables complex typesetting for formulas or equations!

A tutorial is on the following page:
https://www.physicsforums.com/misc/howtolatex.pdf
The topic is also explained in the following thread:
https://www.physicsforums.com/showthread.php?s=&threadid=8997


The feature is LaTeX and the following is possible::

[tex]^{33}_{17}Cl^{16}\xrightarrow{n,n}~^{31}_{15}P^{16}+~^4_2He^2[/tex]

Not long ago we had to write::
33 (1) 31 4
17 Cl + 2(0)n -----> 15 P + 2 He

Causing much confusion as you can imagine
So play around with some formulas if you like, click on the LaTeX image to popup the code with which it was written.


To explain the basics:
_ is subscript
^ is superscript
{} are delimiters, to keep text together
~ is a space


So the code in the above formula is::
[ tex]^{33}_{17}Cl^{16}\xrightarrow{n,n}~^{31}_{15}P^{16}+~^4_2He^2[ /tex]
 
Last edited:

Answers and Replies

  • #2
Monique
Staff Emeritus
Science Advisor
Gold Member
4,217
66
Henderson-Hasselbalch equation:

[tex]pH=pK_a+log\frac{[A^-]}{[HA]}[/tex]
 
Last edited:
  • #3
Monique
Staff Emeritus
Science Advisor
Gold Member
4,217
66
Michaelis-Menten equation

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


or


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


If I can do it, anyone can! :wink:
 
Last edited:
  • #4
Ambitwistor
841
1
[tex]
\newcommand{\atom}[ 4 ]{{}^{#1}_{#2} {#3}^{#4}}

\atom{33}{17}{Cl}{16} \xrightarrow{n,n} \atom{31}{15}{P}{16} + \atom{4}{2}{He}{2}
[/tex]

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

[tex]
\begin{equation*}
\begin{align}
&6CO_2+6H_2O\xrightarrow{\textit{Light Energy}}C_6H_{12}O_6+CO_2 \\
&\Delta G^\circ=+2870~\textrm{kJ/mol}
\end{align}
\end{equation*}
[/tex]
 
  • #5
Monique
Staff Emeritus
Science Advisor
Gold Member
4,217
66
Ambitwistor is not such a simple soul as me :wink:

I actually noticed that I am putting in too many spacers (~), those are not always necessary next to '+' or '\xrightarrow' or '='
 
  • #6
Ambitwistor
841
1
Originally posted by Monique
I actually noticed that I am putting in too many spacers (~), those are not always necessary next to '+' or '\xrightarrow' or '='

In fact, they're almost never necessary; TeX is smart enough in most cases to get the spacing right. If you want to add more spacing, use /, (not ~, that's to prevent line breaks), and if you want to remove spacing, use /; --- but use them sparingly. (There are well-known cases where TeX isn't smart and you need to use them, though; not enough spaces in integrals and too many spaces in bra-kets.)
 
  • #7
Jeebus
255
0
Enthalpy of Vaporization
The amount of energy to change 1 g of liquid to gas at its boiling point. For water,

[tex]\Delta H_{vap} = 540~cal~g^{-1}[/tex]
 
Last edited by a moderator:
  • #8
Ambitwistor
841
1
[tex]
\Delta H_\textrm{vap} = 540 \mbox{ cal~g}^{-1}
[/tex]
 
  • #9
Another God
Staff Emeritus
Gold Member
987
4
OK, exams are over so I have no reason to not learn this stuff now.... here I go.

Moniques version...
[tex]^{33}_{17}{Cl}^{16} \xrightarrow{n,n} ^{31}_{15}P^{16} +~^4_2He^2[/tex]

Ambitwistors version...
[tex]
\newcommand{\atom} [ 4 ] { ^{#1}_{#2} {#3}^{#4}}
\atom {33}{17}{Cl}{16} \xrightarrow{n,n} \atom {31}{15}{P}{16}+\atom {4}{2}{He}{2}
[/tex]
 
Last edited:
  • #10
Another God
Staff Emeritus
Gold Member
987
4
[tex]{pH} = {pK_a} + \log\frac{[A^-]}{[HA]} \\

V = \frac{k_2{[E]}+{}}{K_m + {}} \\


6CO_2 + 6H_2O \xrightarrow{Light Energy} C_6H_{12}O_6 + CO_2 \ \delta G^{\circ} = +2870kJ/mol


[/tex]
Oh, ok, so \\ can only be used as part of an equation to start a new line. To do different equations, you have to use diferent tex flags i guess...?

And why didn't my C6H12) finish....


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

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


Now, will this come up as I want it to? [itex]6CO_2 + 6H_2O \xrightarrow{Light Energy} C_6 H_{12} O_6 + CO_2 \delta G^{\circ} = +2870kJ/mol [/itex] Lets find out...
 
Last edited:
  • #11
Another God
Staff Emeritus
Gold Member
987
4
wow, capitals matter.

that should have been [itex]\Delta[/itex] not [itex]\delta[/itex].

So

[itex]6CO_2 + 6H_2O \xrightarrow{Light Energy} C_6 H_{12} O_6 + CO_2 ~\Delta G^{\circ} = +2870kJ/mol [/itex]
 
  • #12
Another God
Staff Emeritus
Gold Member
987
4
that \ thing never does what I want...[itex]6CO_2 + 6H_2O \xrightarrow{Light\Energy} C_6 H_{12} O_6 + CO_2 ~\Delta \ \ \ \G^{\circ} = +2870kJ/mol [/itex]

Maybe I should use that comma? [itex]6CO_2 + 6H_2O \xrightarrow{Light/,Energy} C_6 H_{12} O_6 + CO_2 ~\Delta /, /, /, G^{\circ} = +2870kJ/mol [/itex]

[itex]6CO_2 + 6H_2O \xrightarrow{Light\,Energy} C_6 H_{12} O_6 + CO_2 ~\Delta \, \, \, G^{\circ} = +2870kJ/mol [/itex]
I think i prefer the tilde (~) key...[itex]6CO_2 + 6H_2O \xrightarrow{Light~Energy} C_6 H_{12} O_6 + CO_2 ~\Delta~~~G^{\circ} = +2870kJ/mol [/itex]
 
Last edited:
  • #13
Ambitwistor
841
1
[itex]6CO_2 + 6H_2O \xrightarrow{\mathit{Light Energy}} C_6 H_{12} O_6 + CO_2, \Delta G^{\circ} = +2870~\mathrm{kJ/mol}[/itex]
 
  • #14
Monique
Staff Emeritus
Science Advisor
Gold Member
4,217
66
You are using itex, that stands for inline?

tex
[tex]^{33}_{17}{Cl}^{16} \xrightarrow{n,n} ^{31}_{15}P^{16} +~^4_2He^2[/tex]

inline
[tex]\inline{^{33}_{17}{Cl}^{16} \xrightarrow{n,n} ^{31}_{15}P^{16} +~^4_2He^2}[/tex]

itex
[itex]^{33}_{17}{Cl}^{16} \xrightarrow{n,n} ^{31}_{15}P^{16} +~^4_2He^2[/itex]

Apparently :) that's cool!
 
  • #15
Another God
Staff Emeritus
Gold Member
987
4
It would be nice if it [itex]did fit inline[/itex] a little better though. At the moment it sits a little low and disrupts the line below, so it doesn't look quite as neat.
 
  • #16
Another God
Staff Emeritus
Gold Member
987
4
I [itex]stand~corrected[/itex]. I guess it depends on the physical size of the formula and stuff. It does a good job of fitting it where it can.
 
  • #17
chem_tr
Science Advisor
Gold Member
609
3
Could you give some information about how to use this typeset in another place?
 
  • #18
Sirus
574
2
If you mean how to use it outside of PF, you need to download a program such as miktex (www.miktex.org).
 
  • #19
dextercioby
Science Advisor
Homework Helper
Insights Author
13,242
1,015
Thanks for the link,Sirus.Maybe i'll get read of the old Scientific Workplace that i'm using now.
 
  • #20
Sirus
574
2
For small applications, you can preview a post on PF with the required code in it, then copy and paste the latex into MS Word or another word processing application. This is discouraged, however, to avoid excess traffic on the PF server (copy/pasting Latex is not, after all, the purpose of PF).
 
  • #21
GCT
Science Advisor
Homework Helper
1,742
0
Trying it out,

[tex]H^+ _{(aq)} + OH^- _{(aq)} \xrightarrow~H_2 O _{(l)}[/tex]
 
Last edited:
  • #22
GCT
Science Advisor
Homework Helper
1,742
0
I should be studying,

[tex]1/p + 1/q = 1/f [/tex]
 
  • #23
GCT
Science Advisor
Homework Helper
1,742
0
this is killing me

[tex]{\Delta G} = {\Delta G^_o} - RT\textit{lnQ} [/tex]

from my current physics course
lens maker's equation
[tex] \frac{n_1}{p} + \frac{n_2}{q} = (n_1-1) \left[ \frac{1}{R_1} - \frac{1}{R_2} \right][/tex]

I'll just do my hw here
[tex]\int ( \textit{lnt} )^2 dt [/tex]

[tex]u= ( \textit{lnt} )^2 [/tex]
[tex]du=2( \textit{lnt} )( \frac{1}{t} ) [/tex]
[tex]dv= dt[/tex]
[tex]v= \int dt = t [/tex]

[tex] \int ( \textit{lnt} )^2 dt = ( \textit{lnt} )^2t - \int 2t( \textit{lnt} )( \frac{1}{t} ) [/tex]
 
Last edited:
  • #24
Gokul43201
Staff Emeritus
Science Advisor
Gold Member
7,176
21
Anyone (ambitwistor ?) know the symbol for the equilibrium (upper half of right arrow above lower half of left arrow) sign ?
 
  • #25
GCT
Science Advisor
Homework Helper
1,742
0
just trying things out
[tex]\xrightarrow{\leftarrow}[/tex]

I noticed Monique's first post where she had the n,n over the arrow and figured one could go on from there.

[tex] \xrightarrow{\xleftarrow} [/tex]
 
Last edited:
  • #26
Gokul43201
Staff Emeritus
Science Advisor
Gold Member
7,176
21
Clever ! That'll have to do until I think it's important to hunt this down or someone comes up with a better answer.
 
  • #27
chem_tr
Science Advisor
Gold Member
609
3
If you have already found this, forgive me, but the solution is \rightleftharpoons or \leftrightharpoons as in the following examples:

[tex]H_2O \rightleftharpoons H^+ + OH^-[/tex]

[tex]H_2O \leftrightharpoons H^+ + OH^-[/tex]
 
Last edited:
  • #28
Gokul43201
Staff Emeritus
Science Advisor
Gold Member
7,176
21
Thanks chem_tr !! :approve:
 
  • #29
endeavour
13
0
Another God said:
that \ thing never does what I want...[itex]6CO_2 + 6H_2O \xrightarrow{Light\Energy} C_6 H_{12} O_6 + CO_2 ~\Delta \ \ \ \G^{\circ} = +2870kJ/mol [/itex]

Maybe I should use that comma? [itex]6CO_2 + 6H_2O \xrightarrow{Light/,Energy} C_6 H_{12} O_6 + CO_2 ~\Delta /, /, /, G^{\circ} = +2870kJ/mol [/itex]

[itex]6CO_2 + 6H_2O \xrightarrow{Light\,Energy} C_6 H_{12} O_6 + CO_2 ~\Delta \, \, \, G^{\circ} = +2870kJ/mol [/itex]
I think i prefer the tilde (~) key...[itex]6CO_2 + 6H_2O \xrightarrow{Light~Energy} C_6 H_{12} O_6 + CO_2 ~\Delta~~~G^{\circ} = +2870kJ/mol [/itex]
lol guys, the photosynthesis equation everyone's using is incorrect ;)
 
  • #30
briton
30
0
[tex] F = \frac {1}{4\pi\epsilon_0}\frac{Q_1Q_2}{r^2}[/tex]
[tex] E_p = \frac {Q_1Q_2}{4\pi\epsilon_0(r_1+r_2)} [/tex]

[tex] E_p = \frac {e^2}{4\pi\epsilon_0(2r_0)}[/tex]

[tex]Q = EV \\[/tex]

[tex]Q = eV \\[/tex]

[tex]E_p = \frac {e}{4\pi\epsilon_0(2r_0)} electron volts
[/tex]

[tex]E_k = \frac{3}{2}kT[/tex]
[tex]\gamma \equiv \frac{1}{\sqrt{1 - v^2/c^2}}[/tex]
 
Last edited:
  • #31
bomba923
760
0
Does anybody know the fancy "capital E" symbol denoting reduction potentials?

I mean, it doesn't seem to be in LaTex---or is it? Where can I get it?

Edit: Is it by any chance a lowercase "xi" ?
That is, a [tex] \xi ^\circ [/tex] ??
 
Last edited:
  • #32
GCT
Science Advisor
Homework Helper
1,742
0
are you referring to emf?
 
  • #33
bomba923
760
0
Yes!! What is the symbol for it? (the fancy capital E thing)!!??

Is it on LaTex??
 
Last edited:
  • #34
GCT
Science Advisor
Homework Helper
1,742
0
I've seen it here somewhere. You may want to somehow italicize the E within the latex.

just trying things out...

[tex] \varepsilon [/tex]
 
Last edited:
  • #35
GCT
Science Advisor
Homework Helper
1,742
0
I think that should do it, it's \varepsilon, unless anyone else has a better method
 

Suggested for: Chemical LaTeX typeset

  • Last Post
Replies
1
Views
297
Replies
10
Views
688
Replies
11
Views
614
Replies
2
Views
186
Replies
8
Views
701
Replies
1
Views
273
Replies
10
Views
395
  • Last Post
Replies
2
Views
995
  • Last Post
Replies
1
Views
794
Top