Code: Select all
\[
f(x) =
\begin{cases}
1 & if 0 \leq x < \pi \\
0 & if \pi \leq x < 2 \pi
\end{cases}
\]
Code: Select all
\[
f(x) =
\begin{cases}
1 & if 0 \leq x < \pi \\
0 & if \pi \leq x < 2 \pi
\end{cases}
\]
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
f(x) =
\begin{cases}
1 & if 0 \leq x < \pi \\
0 & \text{if } \pi \leq x < 2 \pi%please note the
% extra text command
\end{cases}
\]
\end{document}
\usepackage{amsmath}
mathtools
, which automatically loads amsmath
. That's why his example works fine. The older (non-amsmath
) syntax of cases
is different, that's why you would get this error.NEW: TikZ book now 40% off at Amazon.com for a short time.