4

I have the following figure

\begin{bytefield}{31}
\bitheader{0-31}
  \bitbox{120}{Head}
  \bitbox{8}{Tail}
\end{bytefield}

Is it possible to make the Head bitbox line-break at 32 bytes so it fits the bytefield?

2 Answers2

1

The OP figured it out: just using multiple bitboxes and not drawing all borders:

\begin{bytefield}{31}
\bitheader{0-31}
  \bitbox[lrt]{32}{} \      \bitbox[lr]{32}{Head} \      \bitbox[lr]{32}{} \      \bitbox[lrb]{24}{}
  \bitbox{8}{Tail}
\end{bytefield}

... does the trick.

0

You may use the "wordbox" keyword that should let you create multiple lines for a single entry:

\begin{bytefield}{31}
    \bitheader{0-31}
    \wordbox[tlr]{3}{Head} \\ %96 bits
    \bitbox[blr][24]{} &      %remaining 24 bits
    \bitbox{8}{Tail}
\end{bytefield}
  • 2
    Welcome to TeX.SX! Please provide a full example and a screen shot such that other users can immediately test this solution. –  Sep 21 '15 at 16:36