Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following sequence definition:

enter image description here

I can't find a way to write this in Latex. Any hints where to start?

share|improve this question
9  
just use cases environment. search cases first. –  Leo Liu Nov 20 '11 at 17:32

2 Answers 2

up vote 19 down vote accepted

Since the other cases questions ask some specific questions about it, here's a working example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
g(n) = 
\begin{cases}
\frac{2}{3}n & \text{wenn } n \equiv 0 \mod 3,\\
\frac{4}{3}n + \frac{1}{3} & \text{wenn } n \equiv 1 \mod 3,\\
\frac{4}{3}n - \frac{1}{3} & \text{wenn } n \equiv 2 \mod 3.
\end{cases}
\]
\end{document}

The mathmode documentation is extremely helpful for answering these sorts of questions. You can find it on your system using texdoc or its equivalent.

share|improve this answer
\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
  g(n) = \begin{cases}
    \frac{2}{3} n &\ text{wenn } n \equiv 0 \mod 3 \\
    \frac{4}{3} n - \frac{1}{3} & \text{ wenn } n \equiv 1 \mod 3 \\
    \frac{4}{3} n + \frac{1}{3} & \text{ wenn } n \equiv 2 \mod 3
  \end{cases}
\end{equation*}

\begin{equation*}
  \def\arraystretch{1.3}%
  g(n) = \left\{\begin{array}{llll}
    \frac{2}{3} n & \text{wenn} & n \equiv 0 & \mod 3 \\
    \frac{4}{3} n - \frac{1}{3} & \text{wenn} & n \equiv 1 & \mod 3 \\
    \frac{4}{3} n + \frac{1}{3} & \text{wenn} & n \equiv 2 & \mod 3
  \end{array}\right.
\end{equation*}

\end{document}
share|improve this answer
    
The cases environment from amsmath is defined as \left\{\def\arraystretch{1.2}\begin{array}{@{}l@{\quad}l@{}} ... \end{array}\right.. –  Werner Nov 20 '11 at 17:54

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.