3

I want to align the equal sign inside the case with the equal sign outside. How to do that? I have read answers to these questions 1 2 3, but I'm still very clueless. Could anyone please help? Thanks!

\documentclass{article}
\usepackage{amsmath}
\begin{document}  
\begin{align*}
    v&=s\\
    \begin{cases}
    v'_x&=1\\
    v'_y&=2\\
    \end{cases}
\end{align*}
\end{document}
user2165
  • 131

3 Answers3

3

One way is drawing this set of equations:

\documentclass[border=5mm, preview]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,
                matrix}

\begin{document} [ \begin{tikzpicture} \matrix (a) [matrix of math nodes, nodes = {inner ysep=2pt}, column sep=-4pt ] { v & = s \ v'_x & = 1 \ v'_y & = 2 \ }; \draw[decorate,decoration={brace, mirror}] (a-2-1.north -| a-3-1.west) -- (a-3-1.south west); \end{tikzpicture} ] \end{document}

enter image description here

Zarko
  • 296,517
3

A possibility with the blkarray package:

    \documentclass{article}
    \usepackage{blkarray}
    \usepackage{amsmath}
\begin{document}

\[ \begin{blockarray}{r@{}l}
    v&{}=s\\
    \begin{block}{\{r@{}l}
    v'_x &{}=1\\
    v'_y&{}=2\\
    \end{block}
\end{blockarray} \]

\end{document} 

enter image description here

Bernard
  • 271,350
3

Just adapt the code in https://tex.stackexchange.com/a/621802/4427

\documentclass{article}
\usepackage{amsmath}
\usepackage{nicematrix}

\begin{document}

[ \setlength{\arraycolsep}{0pt} \begin{NiceArray}{r >{{}}c<{{}} l} v&=&s\[1ex] v'_x&=&1\[1ex] v'_y&=&2 \CodeAfter\SubMatrix{{2-1}{3-3}. \end{NiceArray} ]

\end{document}

enter image description here

egreg
  • 1,121,712