Math & ScienceEquation Numbering

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
mppxtylr
Posts: 5
Joined: Mon Mar 14, 2011 9:13 am

Equation Numbering

Post by mppxtylr »

Hi,

I'm trying to make an equation and it's not numbering.

Code: Select all

\begin{equation}
\[ CONA = \left\{ \begin{array}{ll}
          1 & \mbox{if $IOPQ < IRTQ\cdot k$};\\
          0 & \mbox{otherwise}.
	\label{eq:fault}
\end{array} \right. \] 
\end{equation}
Is there a way to make this number?

Thank you :)

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Equation Numbering

Post by localghost »

You should listen to the compiler and look at what it tells you in the log file. You are getting errors because nesting two math environment this way can't work. Furthermore there is a much smarter way to typeset a case differentiation by the amsmath package.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}   % loads »amsmath«

\begin{document}
  \begin{equation}\label{eq:fault}
    \text{CONA}=
    \begin{cases}
      1 & \text{if IOPQ} < \text{IRTQ}\cdot k; \\
      0 & \text{otherwise.}
    \end{cases}
  \end{equation}
\end{document}

Thorsten
Post Reply