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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
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