Questions tagged [bytefield]

This is for questions about using the bytefield package which is used to illustrate network and/or specific protocol details including but not limited to bit, bytes, endianness etc.

Filter by
Sorted by
Tagged with
3 votes
1 answer
62 views

bytefield `bgcolor` argument apparently not working

Following page 17 of the bytefield package documentation: extracting the above to this MCVE: \documentclass{article} \usepackage{bytefield} \usepackage{xcolor} \usepackage{graphicx} \definecolor{...
Ralph's user avatar
  • 133
2 votes
1 answer
35 views

Bytefield inside an msc diagram

I'm trying to add a bytefield inside an msc diagram. Here's a MWE: \documentclass{article} \usepackage{bytefield} \usepackage{msc} \begin{document} \begin{bytefield}[bitwidth=1.5em, bitheight=1.5em]{...
Z. Alessandro's user avatar
0 votes
0 answers
61 views

Use the bytefield package within tikz and refer to bitboxes

I'm using the bytefield package to draw protocol specifications. Is there a ways to use the package within a tikzpicture environment and refer to bitboxes the way you can refer to nodes using anchors. ...
tb711's user avatar
  • 75
0 votes
1 answer
49 views

Using foreach to add variable number of rows to a bytefield inside a TikZ node? (part 2)

I am trying to add a variable number of fields to a bytefield, inside a TikZ Node. An earlier question (Using foreach to add variable number of rows to a bytefield inside a TikZ node?) gave helpful ...
Holger Karl's user avatar
0 votes
1 answer
45 views

Using foreach to add variable number of rows to a bytefield inside a TikZ node?

I'd like to loop over a list of fields to be added to a bytefield, to be shown inside a TikZ node. MWE: \documentclass[tikz]{standalone} \usepackage{bytefield} \usepackage{etoolbox} \begin{document} ...
Holger Karl's user avatar
1 vote
2 answers
167 views

Generalize the bitheader field of bytefield package

I am trying to generalize the bitheader from the bytefield package. \begin{bytefield}[endianness=little,bitwidth=0.0625\textwidth]{16} \bitheader{0-15}\\ \bitbox{1}{\footnotesize START} & \bitbox{...
Zhendos's user avatar
  • 81
0 votes
0 answers
85 views

bytefield package \rightwordgroup misaligned curly bracket when compiling with LuaLaTeX

I am using the bytefield package and am following the example listed on page 7 of the the package documentation on CTAN. Creating the following MWE from the code I get the result below: \documentclass[...
jopeto's user avatar
  • 165
0 votes
1 answer
93 views

Fix overlapping bytefiled bit labels

I have the following: \documentclass{article} \usepackage{bytefield} \begin{document} \begin{bytefield}[endianness=big,bitformatting={\small},bitwidth=.5em,bitheight=8ex]{64} \begin{...
Peter's user avatar
  • 178
2 votes
1 answer
100 views

Problem with bytefield and resizebox

When using a very long bytefield I want to use resizebox so it fits in a page. However there seems to be a incompatibility. Based from this answer I assumed it would be easy to do but I face errors ...
jagjordi's user avatar
  • 794
1 vote
1 answer
69 views

Dynamically generating bitheader

I'm trying to dynamically generate a bit header according to what fields are present in a bytefield. I am using LaTeX3 to do so: \documentclass{article} \usepackage{bytefield} \usepackage{expl3} \...
junius's user avatar
  • 2,058
0 votes
1 answer
83 views

Loops only executing first iteration inside bytefield environment

I have a situation where I want a diagram of 16 registers that machine has. I've tried this code, which does not work: \documentclass{article} \usepackage{bytefield} \begin{document} \newcount\X \X=0 ...
junius's user avatar
  • 2,058
0 votes
1 answer
85 views

Tiny & odd-sized field

Bytefield is able to handle odd-sized fields (example taken from the doc): \begin{bytefield}{16} \bitheader{0,7,8,15} \\ \bitbox{8}{8-bit field} & \bitbox[lrt]{8}{} \\ \wordbox[lrb]{1}{24-...
audeoudh's user avatar
  • 278
4 votes
1 answer
541 views

How can I use the package bytefield with the LaTeX class IEEEtran?

Given the MWE %\documentclass{article} \documentclass{IEEEtran} \usepackage{bytefield} \begin{document} \begin{bytefield}[bitwidth=10pt,bitheight=20pt]{8} \bitheader{0-7} \\ \bitbox{1}{A}...
apriori's user avatar
  • 953
1 vote
2 answers
365 views

Moving/Indenting Two Bytefields

I created two bytefields with the package bytefield. The code I used is the following: \begin{bytefield}[endianness=little,bitwidth=0.077777\linewidth]{12} \bitheader{0-11} \\ \bitbox{1}{82} & \...
complexi's user avatar
3 votes
1 answer
369 views

Bytefield: How to add multiple \underbrace below bits diagram

I am new to LaTeX and I am trying to put multiple underbrace under a package using bytefield package. I want to have 4 underbrace consecutive to each other, but I am only able to put 2 and the other 2 ...
farah's user avatar
  • 33
1 vote
2 answers
400 views

adding a source to bytefield

below you see my minimum example. Take a look at the second figure with the \includegraphics. I could add a field for citations as shown below with a tabular inside the figure. This works pretty well. ...
Robert's user avatar
  • 65
1 vote
1 answer
2k views

How to scale a bytefield

I'd like to fit a text into the first 3 bits of a 32-bit bytefield as shown below: \begin{bytefield}[endianness=big,bitwidth=1em]{32} \begin{rightwordgroup}{peripheral\\registers} ...
yildizabdullah's user avatar
1 vote
1 answer
447 views

Unable to center bytefield on the page

I am trying to center a couple of bytefields on the page. The problem I'm encountering is that bytefield is left justified, when I declare bitwidth = \textwidth/32 it appears centered but is not. If I ...
jvnw's user avatar
  • 13
1 vote
2 answers
499 views

Combining color, bitboxes* and base alignment

The code in Misaligment in a rule inside a bitbox has got me almost all of where I need to go, but I also want to be able to color \bitboxes*. I tried this variant of @egreg’s \colorbitbox: \...
James Elliott's user avatar
0 votes
1 answer
688 views

Bytefield - Help with big datagram

I've a datagram with approx. 80 bits. I don't want to divide it in bytes because most of the fields have a length different from 8 bits. \usepackage{bytefield} \begin{document} \begin{...
hen_b's user avatar
  • 115
1 vote
1 answer
1k views

Manipulate bytefield bit header

I'm making a datagram frame using the bytefield, but some of the datagram fields are variable so i would like to manipulate the header to look it like the example bellow. Can someone give me a hint ?
hen_b's user avatar
  • 115
1 vote
2 answers
335 views

Misaligment in a rule inside a bitbox

I want to draw a bytefield. In its documentation there are two tricks, one for baseline text aligment and one for coloring a bitfield with a rule for unused fields. I wanted to put these two ...
Jepessen's user avatar
  • 173
3 votes
1 answer
472 views

bytefield inside tabular

I wonder why it is not easily possible to put a bytefield enviroment into a tabular. This MWE \documentclass[border=2mm]{standalone} \usepackage{bytefield} \begin{document} \begin{tabular}{c} \...
Twonky's user avatar
  • 750
3 votes
1 answer
280 views

Using bytefield in standalone class cuts the field numbers

To me, the described behaviour appears to be a bytefield v2.2 package bug. Maybe I'm getting things wrong and standalone v1.2 is bugged as well. Or it's just me doing things wrong. Typesetting this ...
Twonky's user avatar
  • 750
2 votes
1 answer
480 views

Colored custom bytefield

I've made a bytefield packet (see picture), and I want to color the field with the field 256-bit RSA Signature : Here is the code I used (from another question) : \documentclass[10pt,a4paper]{...
3isenHeim's user avatar
  • 2,107
2 votes
3 answers
968 views

Bytefield colors and baseline align

I just found out about the bytefield package and read the documentation to customize the default layout a bit. I followed the documentation to make sure the baselines of all fields match: \...
Tommiie's user avatar
  • 526
2 votes
2 answers
357 views

Arithmetic overflow error using bytefield package while attempting to constrain width

I'm attempting to draft a document that makes very heavy use of the bytefield package and running into the situation that it seems no good solution exists for fields that have to be 64 bits wide (even ...
ecfedele's user avatar
  • 243
14 votes
3 answers
1k views

etex package still seems to be necessary in LaTeX2e 2015/10/01?

I've experienced this problem after upgrading to TeX Live 2015 and getting newer versions of all my packages. (Presumably some of those package updates are to blame.) MVE: \documentclass{scrartcl} \...
Lightness Races in Orbit's user avatar
2 votes
1 answer
200 views

Custom frame length

I'm working on a custom protocol, with custom frame lengths. I'm drawing the frames using bytefield, and I have a problem, as the length of my frame isn't a multiple of 16 (or 32). Here's my MWE : ...
3isenHeim's user avatar
  • 2,107
4 votes
1 answer
140 views

Using bytefield as parameter to self-defined macro raises error

I defined a simple LaTeX macro \bansen which takes a single argument: \newcommand{\bansen}[1]{#1} Unfortunately, I noticed that I can not use a bytefield environment as a parameter for this macro as ...
Twonky's user avatar
  • 750
4 votes
2 answers
402 views

Bytefields: horizontally align leftwordgroup

My leftwordgroups look pretty ugly in my bytefields. Is it possible to make the same gap between bytefield and leftwordgroup as between bytefield and rightwordgroup? Or is it at least possible, to ...
Nikolar's user avatar
  • 77
2 votes
1 answer
193 views

Using bytefield with wrapfigure

I want to position a bytefield at the right side of the page. For that reason I use the wrapfig package. If I make the wrapfigure smaller than 0.8\textwidth it doesn't work. If it's 0.8\textwidth (or ...
Nikolar's user avatar
  • 77
1 vote
1 answer
127 views

How to use footnotes in a bytefield?

At the moment I am trying to use \footnote inside the rightwordgroup and leftwordgroup environments of a bytefield, as well as inside the labels given to the fields themselves. The numbering at the ...
0xC0000022L's user avatar
4 votes
1 answer
757 views

Color \skippedwords in bytefield package respectively background color in general

The manual of the bytefield package explains how to color a normal bitfield with a colored \rule. I'm also using the \skippedwords command in my figures. I would like to also color that fields. ...
Flasher's user avatar
  • 43
4 votes
1 answer
507 views

Combining packets of different layers

I am starting with bytefield package. I'd like to combine differents byte layers, for example, how this: . Or this: . Can someone put a similar example? Thanks Best regards Oscar
user44654's user avatar
4 votes
1 answer
690 views

Best way to vertically align leftwordgroup with top of wordbox or bitbox

This code \documentclass{article} \usepackage{bytefield} \begin{document} \begin{bytefield}[leftcurly=.,leftcurlyspace=0pt]{32} \begin{leftwordgroup}{0} \wordbox{1}{\the\height} \end{...
Joe Doyle's user avatar
  • 143
4 votes
1 answer
1k views

bytefield doesn't work with subfigures

I'm trying to use bytefield and subfig (and also tested with subfigure with the same results) but I got the error: ! Extra alignment tab has been changed to \cr. \endtemplate at the end of the ...
adn's user avatar
  • 11.2k
4 votes
2 answers
775 views

multiline bitbox

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 ...
bitboxer's user avatar
4 votes
1 answer
549 views

Bytefield bitheader escaping its minipage?

In a small segment of a much larger document, I'm building a poor man's two-column layout using minipages for a short run. The bitheader from the bytefield in the right column, however, seems to be ...
Pat's user avatar
  • 463
6 votes
1 answer
2k views

Bytefield: Word Group below blocks

I would like to get an effect similar to bytefield's letf/right word groups on the bottom of a bytefield. I didn't see any obvious way to do this in the bytefield documentation. My Latex macro ...
Pat's user avatar
  • 463
25 votes
1 answer
777 views

Please explain a strange interaction between bytefield, unicode-math, and mathtools

bytefield gives me different results when used in association with mathtools and unicode-math when used together. Here's my 'good' MWE: % !TEX TS-program = XeLaTeX \documentclass[a4paper]{article} %\...
Brent.Longborough's user avatar
2 votes
1 answer
425 views

How to define a function with undefined number of arguments to draw bytefield with variable number of bitbox?

I have to draw lots of bytefield with different number of bitbox with different shapes. For that I define 3 functions: mybytefield that takes a variable number of arguments (using xparse with \...
user26467's user avatar
6 votes
1 answer
3k views

Bytefield - width of a single bit

Is there a way to control the width of a bit in pixels on a per-diagram basis ? I have a word in a packet with a lot of fields, my text is becoming smaller and smaller. Is there a workaround other ...
boffin's user avatar
  • 493