答案1
与包装nicematrix
和tikz
花括号具有相同的厚度
\documentclass{article}
\usepackage{nicematrix}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,calligraphy}
\begin{document}
\tikzset{
MyBrace/.style = {
decorate,
decoration={
calligraphic brace,
raise=2pt
},
}
}
\[\begin{bNiceArray}{c}
x_k \\
y_k \\
v_k \\
\psi_k \\
b_k
\CodeAfter
\tikz \draw [MyBrace] (1-|2) -- node[right=3pt] {$s_k^p$}(5-|2);
\tikz \draw [MyBrace] (5-|2) -- node[right=3pt] {$s_k^c$} (6-|2);
\end{bNiceArray}\]
\end{document}
旧答案使用包装nicematrix
(但对于花括号的厚度来说不是更好)。
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[\begin{bNiceArray}{c}[last-col]
x_k &\\
y_k &\Block{2-1}{\hspace*{1.5em}s_k^p}\\
v_k &\\
\psi_k &\\
b_k&\hspace*{1.5em}s_k^c
\CodeAfter
\SubMatrix{.}{1-1}{4-1}{\}}[right-xshift=1em]
\SubMatrix{.}{5-1}{5-1}{\}}[right-xshift=1em]
\end{bNiceArray}\]
\end{document}
答案2
恐怕我不知道如何为花括号分配相同的粗细。(可能需要寻求基于 tikz 的解决方案。)
\documentclass{article}
\usepackage{amsmath,array}
\begin{document}
\[
\begin{bmatrix}
x_k \\
y_k \\
v_k \\
\psi_k \\
b_k
\end{bmatrix}
\begin{array}{@{}c@{}}
\left. \begin{array}{@{}c@{}}
\mathstrut\\ \mathstrut\\ \mathstrut\\ \mathstrut
\end{array}\right\} s_k^p \\
\left. \begin{array}{@{}c@{}}
\mathstrut
\end{array}\right\} s_k^c \\
\end{array}
\]
\end{document}