Math & Sciencealignment equation/label

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

alignment equation/label

Post by stewbi »

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 :

Code: Select all

\documentclass[12pt,a4paper,twoside,openright,reqno]{book}
If by this code:

Code: Select all

\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?
thanks for your help

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

alignment equation/label

Post by Johannes_B »

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

Code: Select all

\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}
$<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.
Post Reply