LaTeX forum ⇒ Math & Sciencealignment equation/label

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
stewbi
Posts: 1
Joined: Sun Oct 27, 2013 11:32 am

alignment equation/label

Postby stewbi » Sun Oct 27, 2013 11:55 am

Hi everyone, I've a little problem with the alignment of the label of the equation.
My goal is to obtain a centered equation with its label on the right side
    ..................................dh = cp dT +vdp.............................(1.2)
I'm using :
  1. \documentclass[12pt,a4paper,twoside,openright,reqno]{book}


If by this code:
  1. \begin{equation}
  2. \begin{center}
  3. $dh=c_p dt+vdp$ \label{}
  4. \end{center}
  5. \end{equation}


I delete the \begin{center} TeXnicCenter write the equation on left side and the label on the right but with it I get the equation centered but the label on left side of new line, like this:
.................................dh = cpdT +vdp....................................
(1.2)
idea?
thanks for your help

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4103
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Oct 27, 2013 12:15 pm

The dollar signs, and i think the center-environment as well, are wrong in an equation-environment.

  1. \documentclass[12pt,a4paper,twoside,openright,%reqno
  2. ]{book}
  3. %\usepackage{showframe} %shows a frame around the typearea
  4. \begin{document}
  5. \begin{equation}
  6. dh=c_p dt+vdp \label{}
  7. \end{equation}
  8. \end{document}

$<math>$ changes to LaTeX-Inline-Math-Mode, whereas the equation-environment changes to display-mathmode. Centering the equation is the default, and changes should be made uniformly using a documentwide option to documentclass.

May I ask, where this code is coming from?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 1 guest