Math & ScienceDelimiter problem in math array

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
li
Posts: 1
Joined: Sun Jun 13, 2010 11:54 am

Delimiter problem in math array

Post by li »

Hi, guys. I am using Tex Live shipped with Ubuntu, and I have the following problem:
$G(p,C) = \left\{
\begin{array}{rcl}
]a,b[ & \mbox{if} & l_{-} \neq \phi \neq l_{+} \\
[p,b) & \mbox{if} & l_{-} = \phi \neq l_{+} \\
(a,p) & \mbox{if} & l_{-} \neq \phi = l_{+} \\
\{p\} & \mbox{if} & l_{-} = \phi l_{+}
\end{array} \right.$

This will not complie, however, if I remove (or replace with '(' or ']' ) the [ in the second row of the array, it works. Is it a bug?

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

Delimiter problem in math array

Post by localghost »

Always post full examples. Sometimes it can be necessary to group expressions with curly braces.

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\begin{document}
  \[
    G(p,C) = \left\{
    \begin{array}{@{}rcl}
      {]a,b[} & \text{if} & l_- \neq \phi \neq l_+ \\
      {[p,b)} & \text{if} & l_- = \phi \neq l_+ \\
      (a,p)   & \text{if} & l_- \neq \phi = l_+ \\
      \{p\}   & \text{if} & l_- = \phi l_+
    \end{array} \right.
  \]
\end{document}
Take a look at the cases environment provided by the amsmath package.


Best regards and welcome to the board
Thorsten
Post Reply