Math & Science ⇒ chemistry equations template
-
TreeFuels15
- Posts: 1
- Joined: Tue Apr 14, 2015 4:21 pm
chemistry equations template
Reason: Corrected typo in title
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: chemisty equations template
i think you came just to the right place. One of the great strengths of LaTeX is its capability of mathematical typesetting.
There are packages for chemical equations in specific, but i can't really imagine what you are trying to do. You split everything in atoms describing where each piece is supposed to go and it sounds a bit unusual to me.
Can you provide some image of what you want to set?
Here is a short example of the chemical and mathematical capabilities. As chemistry is a subset of maths, the preset magic is limited.
You can see the output directly by clicking on »Open in Writelatex« (which is now called overleaf).
chemistry equations template
This is kind of a confusing sentence: which »numeral 4«? And where does »superscript 3« suddenly come from?PH2,e with the numeral 4 over the H2 (the H is sub to the P and the 2 is sub to the H). So it would read P(sub H) (sub 2) and superscript 3 over the H
Unfortunately it is rather unclear what exactly you need…
Code: Select all
\documentclass{article}
\usepackage{chemformula}
\begin{document}
% chemistry?
\ch{P_{ch$\sb{4}$}}
\ch{P_{H$\sb2$}^4}
\ch[charge-hshift=0pt]{P_{H$\sb2$}^4}
% mathematics?
$P_{ch_4}$
$P_{H_2}^4$
% mix?
$P_{\ch{ch4}}$
$P_{\ch{H2}}^4$
\end{document}- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
chemistry equations template
Code: Select all
\documentclass[border=10pt]{standalone}
\usepackage{chemformula}
\begin{document}
\begin{tabular}{c}
\ch{2 H2 + O2 <> 2 H2O}\\
$\mathrm P_{\mathrm{ch_4}}$ \\
$\mathrm P_{H_2}^4$ \\
\end{tabular}
\end{document}