答案1
使用tikz
包和tikzmark,decorations.pathreplacing,calligraphy
库在所需位置模拟牙套的绘图。很难与原始牙套 100% 相同。可能有更好的解决方案。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark,decorations.pathreplacing,calligraphy}
\begin{document}
\begin{equation}
\overbrace{\underbrace{\underbrace{0...}_v\underbrace{...0}_y1
...}_{w_1'}\tikzmark{s}
...1
}^{w_1}
\overbrace{\underbrace{0...}_v\underbrace{...0}_y1...1\tikzmark{e}}^{w_2}
\end{equation}
\begin{tikzpicture}[remember picture, overlay]
\draw [decoration={calligraphic brace,mirror,amplitude=5pt},decorate,line width=1.1pt] ([yshift=-16.5pt]pic cs:s) -- node[below=3pt]{\scriptsize$w_2'$} ([yshift=-16.5pt]pic cs:e);
\end{tikzpicture}
\end{document}
编辑:使用包的另一种解决方案
oubraces
:
\documentclass{article}
\usepackage{oubraces}
\begin{document}
\begin{equation}
\overunderbraces{&\br{3}{w_1}&\br{1}{w_2}}%
{&\underbrace{0...}_v\underbrace{...0}_y1...&~&...1&\underbrace{0...}_v\underbrace{...0}_y1...1}%
{&\br{1}{w_1'}&&\br{2}{w_2'}}
\end{equation}
\end{document}
答案2
这是一个{NiceArray}
使用 的解决方案nicematrix
。
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\setlength{\arraycolsep}{1pt}
$\begin{NiceArray}{ccccccc}[cell-space-limits=5pt]
\underbrace{0 \dots }_{v}
& \underbrace{\dots 0}_{y}
& 1 \dots
& \dots 1
& \underbrace{0 \dots}_{v}
& \underbrace{\dots 0}_{y}
& 1 \dots 1
\CodeAfter
\UnderBrace[right-shorten]{1-1}{1-3}{\scriptstyle w_1'}
\UnderBrace[left-shorten]{1-4}{1-7}{\scriptstyle w_2'}
\OverBrace[right-shorten]{1-1}{1-4}{\scriptstyle w_1}
\OverBrace[left-shorten]{1-5}{1-7}{\scriptstyle w_2}
\end{NiceArray}$
\end{document}
您需要多次编译(因为nicematrix
在后台使用 PGF/Tikz 节点)。