LaTeX forum ⇒ Math & ScienceBreak up Equation and keep its Label right Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
NinaKeul
Posts: 5
Joined: Fri Sep 07, 2012 9:48 pm

Break up Equation and keep its Label right

Postby NinaKeul » Fri Sep 07, 2012 9:55 pm

Dear all,

I am an newbie to LaTeX and hope that somebody can help me.

I have read through many forum postings, but could not find an answer, that would solve my problem.

I am trying to include a couple of equations into my thesis and have problems with placing the equation label exactly on the right for equations that are longer than one line (for single line equations it works just fine).


Below is a minimal examples of my code.

Thank you very much in advance,
Nina

  1. \documentclass[a4paper, twoside, titlepage, openright, 12pt, listof=totoc]{scrreprt}
  2. \usepackage{amsmath, amssymb}
  3.  
  4. \begin{document}
  5.  
  6. \begin{equation}
  7. DIC =[CO_2^*]+[HCO_3^-]+ [ CO_3^{ 2-}]
  8. \label{equ:4}
  9. \end{equation}
  10.  
  11. \begin{equation}
  12. TA =[HCO_3^-]+2 [ CO_3^{ 2-}]+[B(OH)_4^-]+[OH^-]+[HPO_4^{2-}]+2[PO_4^{3-}]\\
  13. +[Si(OH)_3^-]+[NH_3]+ [HS^-]+...-[H^+]_F-[HF]-[H_3PO_4]-... \label{equ:6}
  14. \end{equation}
  15. \end{document}
Last edited by localghost on Fri Sep 07, 2012 9:59 pm, edited 2 times in total.
Reason: Source code has to be tagged as such to keep a post clear and legible (see Board Rules).

Tags:

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Sep 07, 2012 10:10 pm

Hi Nina,

Welcome to the LaTeX community!

The split environment provided by amsmath is what you need. Details on it and on many other math related stuff can be found in the excellent mathmode document.

I couldn't help noticing that you're trying to typeset chemical formulas. For that task I would recommend either using the mhchem or the chemmacros package. Here is an example:

  1. \documentclass{scrreprt}
  2. \usepackage{amsmath}
  3. \usepackage{chemmacros}
  4.  
  5. \begin{document}
  6.  
  7. \begin{equation}
  8. DIC = \ch{[CO2^*] + [HCO3^-] + [CO3^{2-}]} \label{equ:4}
  9. \end{equation}
  10.  
  11. \begin{equation}
  12. \begin{split}
  13. TA &= \ch{[HCO3^-] + 2 [CO3^{2-}] + [B(OH)4^-] + [OH^-] + [HPO4^{2-}] + 2 [PO4^{3-}]} \\
  14. &\quad \ch{+ [Si(OH)3^-] + [NH3] + [HS^-] +} \ldots - \ch{[H^+]_F} - \ch{[HF]} - \ch{[H3PO4]} - \ldots
  15. \end{split}
  16. \end{equation}
  17.  
  18. \end{document}


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

NinaKeul
Posts: 5
Joined: Fri Sep 07, 2012 9:48 pm

Postby NinaKeul » Sat Sep 08, 2012 12:51 pm

Hi Clemens,

thank you very much for the fast solution and pointing me to teh packages for chemical formulas.

Works perfectly!

Best wishes,
Nina


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests