3

I am using bytefield package with beamer having the same problem described here. According with Till Tantau, in 2004, the problem is due to the fact that bytecode redefines the so-called catcode of & to 10.

Any other hint? Are there alternatives to use?

The code I am using:

\documentclass[]{beamer}

\usepackage[T1]{fontenc} 
\usepackage[brazil]{babel}  
\usepackage[utf8]{inputenc}

\usepackage{bytefield}

\begin{document}

\frame{
  \frametitle{}

\begin{bytefield}[leftcurly=.]{32}
\bitheader[endianness=big]{0,22,23,30,31} \\
\begin{leftwordgroup}{}
\bitbox{1}{s} & \bitbox{8}{\textcolor{red}{E}} & \bitbox{23}{f - mantissa}
\end{leftwordgroup} 
\end{bytefield}

}
\end{document}
2

The bytefield environment does something similar to what verbatim does; so a frame containing it should be declared fragile:

\begin{frame}[fragile]

\frametitle{What?}

\begin{bytefield}[leftcurly=.]{32}
\bitheader[endianness=big]{0,22,23,30,31} \\
\begin{leftwordgroup}{}
\bitbox{1}{s} & \bitbox{8}{\textcolor{red}{E}} & \bitbox{23}{f - mantissa}
\end{leftwordgroup} 
\end{bytefield}

\end{frame}

For "fragile frames" the environment form is mandatory, see section 12.9 of the manual. However, I recommend it also for all other frames, since

\frame{...}

requires to keep track of the braces, while \begin{frame} and \end{frame} are more evident in the source file.

Your Answer

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