## LaTeX forum ⇒ Math & Science ⇒ alignment 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

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 :
\documentclass[12pt,a4paper,twoside,openright,reqno]{book}

If by this code:
\begin{equation}   \begin{center}     $dh=c_p dt+vdp$ \label{}   \end{center}\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?

Tags:

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
The dollar signs, and i think the center-environment as well, are wrong in an equation-environment.

\documentclass[12pt,a4paper,twoside,openright,%reqno ]{book}%\usepackage{showframe} %shows a frame around the typearea\begin{document}     \begin{equation}         dh=c_p dt+vdp \label{}     \end{equation}\end{document}

$[itex]$ 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.