# How is bytefield inducing differences between Pdf-and Xe-TeX and LuaTeX, and what's the fix?

This is a simplification of 'Please explain a strange interaction between bytefield, unicode-math, and mathtools', which arises from a comment by @JLDiaz (to whom my thanks).

Here is the MWE:

\documentclass[a4paper]{article}
\usepackage{bytefield}
\begin{document}
\begin{bytefield}{16}
\begin{rightwordgroup}{LuaLaTeX} % <= Processed with
\bitbox{16}{Without}\\
\bitbox{16}{Etc}
\end{rightwordgroup}\\
\end{bytefield}
\end{document}


I've processed this with PdfLaTeX, XeLaTeX, and LuaLaTeX, with the results that follow. (Note that I have checked that it depends on the processor used, not on the name in braces.). Here are the results:

So, any ideas what's wrong, and how to fix?

-

Well they are using completely different characters for }. Add \showoutput

pdftex uses

................\hbox(0.39998+29.60031)x8.05559, shifted -14.60016
.................\OMX/cmex/m/n/5 )


But luatex uses

................\vbox(36.00037+0.0)x8.8889, shifted 15.50018, direction TLT
.................\hbox(0.0+9.00009)x8.8889, direction TLT
..................\OMX/cmex/m/n/10 9
.................\hbox(0.0+18.00018)x8.8889, direction TLT
..................\OMX/cmex/m/n/10 =
.................\hbox(0.0+9.00009)x8.8889, direction TLT
..................\OMX/cmex/m/n/10 ;


That is three glyph parts stacked by hand (you can see a gap in your image)

Compare (using say pdflatex) the output from

1{\csname OMX/cmex/m/n/5\endcsname )}

2{\csname OMX/cmex/m/n/10\endcsname 9 = ;}


Which produces

someone else would have to say why lualatex is using a different brace construct...

-
Yes. The gap is a PDF viewer rendering artifact, not directly a part of the problem. I apologise for not taking more care with my screencap. – Brent.Longborough Mar 15 '13 at 16:47
@Brent.Longborough well not really it was the hint as to where the problem was as you can't have such an artefact in the other cases as they are a single glyph. – David Carlisle Mar 15 '13 at 16:57