| New Reply |
Chemical LaTeX typeset |
Share Thread | Thread Tools |
| May13-08, 02:08 PM | #52 |
|
|
Chemical LaTeX typeset
[tex]dE = dQ-dW[/tex]
[tex]C=\frac{dQ}{MdT}[/tex] [tex]dQ[/tex] [tex]dE[/tex] [tex]dW[/tex] [tex]M[/tex] [tex]dT[/tex] sorry for spam =( |
| Jun3-08, 04:42 PM | #53 |
|
Admin
|
I have not used these symbols for ages, not to mention in LaTeX. How should I properly format statement "for each a and b belonging to set P if a<b then ab belongs to set P2"?
My idea was that it shoud be something like [tex]\forall a, b \in P a < b \Rightarrow ab \in P_2[/tex] but it looks like something run over by a truck. |
| Jun30-09, 08:13 AM | #54 |
|
|
First post, and it's about LaTeX! I've been working with LaTeX for some time now, and recently started getting serious about typesetting spectroscopic notation. I actually started this post asking a question, but while developing the post, I came across an acceptable answer. As such, the tone of this post will change from question to tip.
I have been trying to typeset any general chemical equation or spectroscopic configuration notation without italics. I have known of the \text{} command, and recently found the \textrm{} command, but both of these complain when there are superscripts, subscripts, or Greek characters within the {} delimiters. As is shown in this thread, you can easily get away with carefully placing the delimiters and \text{} commands. For example, I want to write the following configuration information: [tex] \text{4f}^{14}\text{6s6p}~^3\text{P}_1 [/tex] As another example, as was previously posted, My solution: Use the \mathrm{} command! Here's the same examples, cleaned up a bit using this new command: [tex] \mathrm{4f^{14} 6s 6p ~ ^3P_1} [/tex] [tex] \mathrm{10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O} [/tex] Even better, define a new command which enforces math mode, as well as this Roman font. something like \newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}} and then you can just simply type \chem{H_2 SO_4} wherever you want, both inside or outside of math mode. With proper use of whitespace, the LaTeX markup looks more elegant and easy to read/diagnose in my opinion. Hope this helps! It definitely helps me! |
| Jun30-09, 10:03 AM | #55 |
|
Hmmmm. I'm not quite sure what you are getting at....
|
| Jun30-09, 12:40 PM | #56 |
|
|
Well, take a look at the actual TeX code for the two examples. To compare, here's the original:
Code:
10\textrm{K}_{4}\textrm{Fe(CN)}_{6}+122\textrm{KMn O}_{4}+299\textrm{H}_{2}\textrm{SO}_{4}\rightarrow 162\textrm{KHSO}_{4}+5\textrm{Fe}_{2}\textrm{(SO}_ {4}\textrm{)}_{3}+122\textrm{MnSO}_{4}+60\textrm{H NO}_{3}+60\textrm{CO}_{2}+188\textrm{H}_{2}\textrm {O}
Code:
%this should go in your preamble somewhere
\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}
%and then later, in your document...
\chem{10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O}
|
| Jun30-09, 01:53 PM | #57 |
|
OK, I'll bite. Placing "\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}" within the tex delimiters...
[tex] \newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}} [/tex] and entering the string you recommended "\chem{10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O}" yields, [tex] \chem{10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O} [/tex] versus just entering the string between tex delimiters.... [tex] 10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O [/tex] Aside from the spacing between the '+' signs, I see no advantage. |
| Jun30-09, 03:39 PM | #58 |
|
|
For the scope of this forum, try this:
Code:
(tex)%NOTE: replace ( with [ to use!
\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}
\chem{10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O}
(/tex)
[tex] \newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}} \chem{10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O} [/tex] When you put things in the [tex] [/ tex] delimiters here, it looks like it's an isolated environment, and thus any commands you define must be used within that same [tex] [/ tex] delimiter. My point here, although it may be a minor one in retrospect, is that I introduce an italic-free typesetting environment for stuff like chemical formulas or spectroscopic notation, which can work independent of an equation block. I had assumed this forum was discussing the general application of LaTeX for typesetting chemistry-related stuff. My earlier suggestion of placing the \newcommand{} within the preamble is referring to a LaTeX document, in my case, prepared by MikTeX 2.7. |
| Apr5-10, 07:51 AM | #59 |
|
|
lemme try
[tex]6CO_2 + 6H_2O \xrightarrow{\mathit{Light Energy}} C_6 H_{12} O_6 + CO_2, \Delta G^{\circ} = +2870~\mathrm{kJ/mol}[/tex] [tex] \chem{10 K_4 Fe (CN)_6 + 122 K MnO_4 + 299 H_2 SO_4 \rightarrow 162 K H SO_4 + 5 Fe_2 (SO_4)_3 + 122 Mn SO_4 + 60 H NO_3 + 60 CO_2 + 188 H_2 O} [/tex] awsome |
| Dec8-10, 11:46 AM | #60 |
|
|
Hello,
I was wondering if someone could help me with some latex typeset. I can't find how to do the L- and D- used in chemistry to distinguish the chirality of a compound. Thanks for your help! |
| Jun15-11, 10:40 PM | #61 |
|
|
Thanks so much for this thread! I just have one question.
How do I get the equilibrium arrows to stay centered when listed on a page? [tex]NO_2 + CO~ \xrightarrow{k_1}~ NO + NO_3[/tex][tex]NO_3 + CO~ \xrightarrow{k_2}~ NO_2 + CO_2 +XXXX +YYYYYY +ZZZZZZ[/tex] Can you see how if this was centered on a page the arrows wouldn't be aligned? |
| Jun20-11, 10:46 AM | #62 |
|
|
Hi icosane,
Some time ago, I participated in a thread that talked about multi-line equations in LaTeX. You can find it at http://www.physicsforums.com/showthread.php?t=325387. For your example, try something like: [tex] \begin{align}\begin{split} NO_2 + CO~ &\xrightarrow{k_1}~ NO + NO_3\\ NO_3 + CO~ &\xrightarrow{k_2}~ NO_2 + CO_2 +XXXX +YYYYYY +ZZZZZZ \end{split}\end{align} [/tex] To show you that the alignment is behaving: [tex] \begin{align}\begin{split} NO_2 + CO~ &\xrightarrow{k_1}~ NO + NO_3\\ NO_3 + CO + XXXX + YYYYY + ZZZZZZ~ &\xrightarrow{k_2}~ NO_2 + CO_2 +XXXX +YYYYYY +ZZZZZZ \end{split}\end{align} [/tex] |
| New Reply |
| Thread Tools | |
Similar Threads for: Chemical LaTeX typeset
|
||||
| Thread | Forum | Replies | ||
| chemical Latex for web pages | Math & Science Software | 0 | ||
| chemical element and chemical property | Introductory Physics Homework | 1 | ||
| What is the chemical name for: | Biology, Chemistry & Other Homework | 4 | ||
| Chemical and Bio-chemical Sensor | Electrical Engineering | 1 | ||
| Chemical rxn help | Biology, Chemistry & Other Homework | 1 | ||