我有下图
\begin{bytefield}{31}
\bitheader{0-31}
\bitbox{120}{Head}
\bitbox{8}{Tail}
\end{bytefield}
是否可以使Head
bitbox 换行在 32 字节处以适合bytefield
?
答案1
OP 想通了:只使用多个位框而不绘制所有边框:
\begin{bytefield}{31}
\bitheader{0-31}
\bitbox[lrt]{32}{} \ \bitbox[lr]{32}{Head} \ \bitbox[lr]{32}{} \ \bitbox[lrb]{24}{}
\bitbox{8}{Tail}
\end{bytefield}
... 成功了。
答案2
您可以使用“wordbox”关键字,它可以让您为单个条目创建多行:
\begin{bytefield}{31}
\bitheader{0-31}
\wordbox[tlr]{3}{Head} \\ %96 bits
\bitbox[blr][24]{} & %remaining 24 bits
\bitbox{8}{Tail}
\end{bytefield}