Consider the following code:
\documentclass{article}
\usepackage{tikz}
\usepackage{array}
\usepackage{mathtools}
\begin{document}
\begin{equation}
a(y)=\left\{
\begin{array}{@{}ll@{}}
0 & \text{if}\ y < 1 \\
\frac{1}{2}\biggl[ 1 + sin\left(\frac{2 \pi}{\theta}\right) \biggr] & \text{if}\ 1\leq y < 4 \\
1 & \text{if}\ 4 \leq y < 5 \\
\frac{1}{2}\biggl[ 1 - sin\left(\frac{2 \pi}{\theta}\right) \biggr] & \text{if}\ 6 \leq y < 7 \\
0 & \text{otherwise}
\end{array}\right.
\end{equation}
\end{document}
The output is:
How to achieve the following calligraphic curly brace (The following image borrowed from here) offered by TikZ package, in equation environment:
A similar style was implemented for a matrix in this answer. I couldn't implement it for an equation.
Best Answer
I suspect that there is an elegant solution using the
nicematrix
package, but I haven't the experience of that to provide it. Here's a tikz solution that wraps the array environment in a tikz node and then decorates the left-hand edge with a brace.Obviously, there are parameters to tweak to improve the look, such as line width and amplitude.
(Incidentally, this is exactly the use-case I was envisioning when I designed these braces.)
Here's with
amplitude=3mm
: