TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I produce a result like this without resorting to using a table? to the left of the braces is the result of a function, to the right are the terms (left column) with the conditions (right column)

enter image description here

share|improve this question
up vote 4 down vote accepted

One approach is with the cases environment from amsmath:

\documentclass{article}
\usepackage{amsmath}
\newcommand{\bla}{\mathit{bla}}
\begin{document}
\[\bla =
\begin{cases}
    \bla, & n < 0\\
    \bla^2. & n = 0\\
    \bla^{-1}, & n > 0.
\end{cases}\]
\end{document}

enter image description here

There are a few different environments you can use here:

  • cases sets both columns in text-style math mode.
  • cases* from the mathtools package sets the first column in math mode, and the second column in text mode.
  • dcases (also from mathtools) uses display-style math instead. This is useful if one of your definitions has an integral or a fraction in it.
  • Finally, dcases* (also from mathtools) sets the first column in display-style math, and the second in text mode.
share|improve this answer

This is a case (pun ;-) for one of the various cases environments, e.g. dcases from mathtools or just cases (already in amsmath)

The relevant text should be put in proper \text{...} command, but this has been omitted here

I used dcases for nicer display (d stands for displaymath here)

\documentclass{article}
\usepackage{mathtools}
\begin{document}

\[
 f = \begin{dcases}
   a & bla \\
   c & blabla \\
   e & blabla \\
   \end{dcases}
\]
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.