Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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