答案1
一种方法是使用raisebox
移动注释条件来表示第二和第三,并且˙Ti钾用于绘制花括号的Z 库tikzmark
。其中使用了decorations.pathreplacing
以下calligraphy
库:
\documentclass[margin=3mm, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{cases}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,%
calligraphy,% had to be after decorations.pathreplacing
tikzmark}
\tikzset{
BC/.style = {
decorate,
decoration={calligraphic brace, amplitude=4pt,
raise=1pt, #1},% #1 is for mirroring of brace, if needed
very thick},
}
\begin{document}
\begin{numcases}{x = }
\label{eq:case1} x+1 & if $x=3$ \\
\label{eq:case2} \tikzmarknode{A}{x-1} & \smash{\raisebox{-0.75\baselineskip}{if $x=1$}} \\
\label{eq:case3} \tikzmarknode{B}{x/3} &
\end{numcases}
\begin{tikzpicture}[overlay, remember picture]
\draw[BC] (A.north east) -- (A.north east |- B.south);
\end{tikzpicture}
see \ref{eq:case1}, \ref{eq:case2} and \ref{eq:case3} ...
\end{document}