LaTeX forum ⇒ Math & ScienceUnderset under underset

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Henrique Junior
Posts: 1
Joined: Thu Aug 02, 2012 8:08 pm

Underset under underset

Postby Henrique Junior » Thu Aug 02, 2012 8:14 pm

Hi, in new in Latex (sorry for my poor english).

I'd like to create one chemical equation, but I want every reactant to have two little observations in below. Underset looks like a good approach, but is there any way to add two undersets in the same reactants? Here is my code:
  1. \ce{Cu^{2+} + 4NH_{3}}\ce{<=>}\ce{[Cu(NH_{3})_{4}]^{2+}}

I need to add two little observations below every reactant.

Tags:

niteshs
Posts: 45
Joined: Wed Jun 06, 2012 9:57 pm

Postby niteshs » Fri Aug 03, 2012 5:23 pm

Hello Henrique Junior,

You haven't provided any information about your example, but I am guessing you are using the chemstyle package (from the \ce commands). You might want to look here for providing a Infominimal working example.

I am not sure how to get the undersets with chemstyle, I prefer the chemmacros package instead, which I think is much more powerful.

Here is your example using chemmacros:
  1. \documentclass{article}
  2.  
  3. \usepackage{chemmacros}
  4.  
  5. \begin{document}
  6.  
  7. \ch{Cu^{2+} + 4 NH3 <=> [Cu(NH3)4]^2+}
  8.  
  9. \end{document}

And here is the code that produces undersets:
  1. \documentclass{article}
  2.  
  3. \usepackage{chemmacros}
  4.  
  5. \begin{document}
  6.  
  7. \ch{!(under1\linebreak under2)( Cu^{2+} ) + !(under3\linebreak under4)( 4 NH3 ) <=> !(under5\linebreak under6)( [Cu(NH3)4]^{2+} )}
  8.  
  9. \end{document}

As you can see, most compunds written in chemstyle syntax can be simply converted to chemmacros syntax by changing \ce to \ch, however there are several differences between the two. In fact I think chemmacros syntax is actually simpler. I hope this helps in your case.

Edit: It seems you might be using the mhchem package which allows you to use the \underset command by entering math mode. Loot at this post for a solution if you want to stick with mhchem. However I would still prefer chemmacros, because when you enter mathmode you will have to keep using \mathrm{} to avoid italicizing all the text.


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 11 guests