0

How can I achieve this in LaTeX?

enter image description here

3

Your question is probably a duplicate of this one, but I like to show you an alternative solution with tikzmark.

\documentclass{article}
\usepackage{amsmath}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{tikzmark, calc}

\newcommand{\mybrace}[3]{%
    \draw[decorate,decoration={brace,mirror}] 
        ($(pic cs:#1)+(-.3,.3)$) -- node[xshift=-1em, align=left, text width=4em]{#3} ($(pic cs:#2)+(-.3,-.1)$);}

\renewcommand*{\arraystretch}{1.25}

\begin{document}
\[
\begin{bmatrix}
\tikzmark{lp} P \\
\tikzmark{lq} Q \\
\tikzmark{gp} P \\
\tikzmark{gq} Q \\
\end{bmatrix}
\]
\begin{tikzpicture}[overlay,remember picture,baseline]
    \mybrace{lp}{lq}{Load}
    \mybrace{gp}{gq}{Gen}
\end{tikzpicture}
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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