3

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?

  • @Werner: so I moved it into an answer, but made it CW. Don't want to be accused of trying to steal rep :) – 0xC0000022L Jun 4 '14 at 15:30
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}
  • 1
    Welcome to TeX.SX! Please provide a full example and a screen shot such that other users can immediately test this solution. – user31729 Sep 21 '15 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.