Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Chemical LaTeX typeset

  1. Nov 16, 2003 #1

    Monique

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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: Nov 16, 2003
  2. jcsd
  3. Nov 16, 2003 #2

    Monique

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Henderson-Hasselbalch equation:

    [tex]pH=pK_a+log\frac{[A^-]}{[HA]}[/tex]
     
    Last edited: Nov 16, 2003
  4. Nov 16, 2003 #3

    Monique

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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: Nov 16, 2003
  5. Nov 16, 2003 #4
    [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]
     
  6. Nov 16, 2003 #5

    Monique

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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 '='
     
  7. Nov 16, 2003 #6
    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.)
     
  8. Nov 23, 2003 #7
    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: Sep 19, 2011
  9. Nov 23, 2003 #8
    [tex]
    \Delta H_\textrm{vap} = 540 \mbox{ cal~g}^{-1}
    [/tex]
     
  10. Dec 6, 2003 #9

    Another God

    User Avatar
    Staff Emeritus
    Gold Member

    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: Dec 6, 2003
  11. Dec 6, 2003 #10

    Another God

    User Avatar
    Staff Emeritus
    Gold Member

    [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: Dec 6, 2003
  12. Dec 6, 2003 #11

    Another God

    User Avatar
    Staff Emeritus
    Gold Member

    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]
     
  13. Dec 6, 2003 #12

    Another God

    User Avatar
    Staff Emeritus
    Gold Member

    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: Dec 6, 2003
  14. Dec 6, 2003 #13
    [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]
     
  15. Dec 6, 2003 #14

    Monique

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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!
     
  16. Dec 6, 2003 #15

    Another God

    User Avatar
    Staff Emeritus
    Gold Member

    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.
     
  17. Dec 6, 2003 #16

    Another God

    User Avatar
    Staff Emeritus
    Gold Member

    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.
     
  18. Nov 6, 2004 #17

    chem_tr

    User Avatar
    Science Advisor
    Gold Member

    Could you give some information about how to use this typeset in another place?
     
  19. Nov 25, 2004 #18
    If you mean how to use it outside of PF, you need to download a program such as miktex (www.miktex.org).
     
  20. Nov 26, 2004 #19

    dextercioby

    User Avatar
    Science Advisor
    Homework Helper

    Thanks for the link,Sirus.Maybe i'll get read of the old Scientific Workplace that i'm using now.
     
  21. Nov 26, 2004 #20
    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).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Chemical LaTeX typeset
  1. Colour of Chemicals? (Replies: 13)

  2. Chemical nomenclature (Replies: 6)

  3. Chemical equilibrium (Replies: 4)

  4. Chemical potential (Replies: 2)

  5. Chemical clocks (Replies: 2)

Loading...