答案1
我会用 tikz 来做这个。例如,使用 tikz 矩阵:
\documentclass {standalone}
\usepackage {tikz}
\usetikzlibrary{calc}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix(M)[matrix of math nodes]
{%
& & & & & & 2^m & & & & & \\
& & & & & & 2^{m-1} & & & & & \\
& & \ddots & & & & \vdots & & & & & \\
& & & & & & 4 & & & & & \\
& & & & & & 2 & & & & & \\
& & & & & & 1 & & & & & \\
b_m & b_{m-1} & \cdots & b_2 & b_1 & b_0 & b_{-1} & b_{-2} & b_{-3} & \cdots & b_{-n+1} & b_{-n} \\
& & & & & 1/2 & & & & & & \\
& & & & & 1/4 & & & & & & \\
& & & & & 1/8 & & & & & & \\
& & & & & \vdots & & & & \ddots & & \\
& & & & & 1/2^{n-1} & & & & & & \\
& & & & & 1/2^n & & & & & & \\
};
\node at ($(M-7-6)!0.5!(M-7-7)$) {$\cdot$};
\foreach\i in {1,2,4,5,6}
{%
\draw[thick] (M-7-\i.north) |- (M-\i-7.west);
}
\foreach\i in {7,8,9,11,12}
{%
\pgfmathtruncatemacro\j{\i+1}
\draw[thick] (M-7-\i.south) |- (M-\j-6.east);
}
\end{tikzpicture}
\end{document}
编辑:正如 OP 所建议的,我将 改为matrix of nodes
a matrix of math nodes
,以减少代码量。