0

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[12pt,a4paper]{article}

\usepackage{bytefield}

\begin{document}

\begin{bytefield}{16} \bitheader{0,7,8,15} \ \begin{rightwordgroup}{Header} \bitbox{4}{Tag} & \bitbox{12}{Mask} \ \bitbox{8}{Source} & \bitbox{8}{Destination} \end{rightwordgroup} \ \wordbox{3}{Data} \end{bytefield}

\end{document}

enter image description here

As you can see the top of the curly bracket is not properly aligned. As a comparison, here is what this code should compile to according to page 8 in the manual:

enter image description here

Any advice on how to fix that issue would be greatly appreciated.

(I am using Tex Live on Windows 10 with version 2.6 of the bytefield package)

Edit:

As requested, here is the logfile:

This is LuaHBTeX, Version 1.13.2 (TeX Live 2021/W32TeX)  (format=lualatex 2021.5.26)  16 AUG 2021 14:22
 restricted system commands enabled.
**mwe.tex
(./mwe.tex
LaTeX2e <2020-10-01> patch level 4
Lua module: luaotfload 2021-05-21 3.18 Lua based OpenType font support
Lua module: lualibs 2021-05-20 2.74 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2021-05-20 2.74 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | conf : Root cache directory is "C:/texlive/2021/texmf-var/luatex-ca
che/generic/names".
luaotfload | init : Loading fontloader "fontloader-2021-05-20.lua" from kpse-res
olved path "c:/texlive/2021/texmf-dist/tex/luatex/luaotfload/fontloader-2021-05-
20.lua".
Lua-only attribute luaotfload@noligature = 1
Lua-only attribute luaotfload@syllabe = 2
luaotfload | init : Context OpenType loader version 3.116
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.glyph_stream' at position 1 in `glyph_stream_provider'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 3
luaotfload | conf : Root cache directory is "C:/texlive/2021/texmf-var/luatex-ca
che/generic/names".
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_truetype_file'.
Inserting `luaotfload.harf.finalize_vlist' at position 1 in `post_linebreak_filt
er'.
Inserting `luaotfload.harf.finalize_hlist' at position 2 in `hpack_filter'.
Inserting `luaotfload.cleanup_files' at position 1 in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' at position 1 in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' at position 1 in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 4
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_fon
t'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 in `luaotfload.patch
_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_fon
t_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 4 in `luaotfload.patch_font
'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'
. L3 programming layer <2021-05-25>
(c:/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(c:/texlive/2021/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from C:/texlive/2021/texmf-var/luat
ex-cache/generic/names/luaotfload-names.luc)
\c@part=\count177
\c@section=\count178
\c@subsection=\count179
\c@subsubsection=\count180
\c@paragraph=\count181
\c@subparagraph=\count182
\c@figure=\count183
\c@table=\count184
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(c:/texlive/2021/texmf-dist/tex/latex/bytefield/bytefield.sty
Package: bytefield 2020/10/31 v2.6 Network protocol diagrams

(c:/texlive/2021/texmf-dist/tex/latex/tools/calc.sty Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ) \calc@Acount=\count185 \calc@Bcount=\count186 \calc@Adimen=\dimen139 \calc@Bdimen=\dimen140 \calc@Askip=\skip49 \calc@Bskip=\skip50 LaTeX Info: Redefining \setlength on input line 80. LaTeX Info: Redefining \addtolength on input line 81. \calc@Ccount=\count187 \calc@Cskip=\skip51 ) (c:/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks15 ) \bytefield@height=\skip52 \bytefield@height@increment=\skip53 \entire@bytefield@picture=\box47 \bf@bitwidth=\skip54 \bf@bitheight=\skip55 \units@wide=\skip56 \units@tall=\skip57 \units@high=\skip58 \header@xpos=\skip59 \c@header@val=\count188 \c@max@header@val=\count189 \curly@box=\box48 \wordlabelr@start=\skip60 \wordlabelr@end=\skip61 \wordlabell@start=\skip62 \wordlabell@end=\skip63 \total@lbox@width=\skip64 \label@box@width=\skip65 \label@box@height=\skip66 \word@label@box=\box49 ) (c:/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-luatex.def File: l3backend-luatex.def 2021-05-07 L3 backend support: PDF output (LuaTeX) \l__color_backend_stack_int=\count190 \l__pdf_internal_box=\box50 ) (./mwe.aux) \openout1 = mwe.aux

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5. LaTeX Font Info: Trying to load font information for TS1+cmr on input line 5 . (c:/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions ) LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. \width=\dimen141 \height=\dimen142 \depth=\dimen143 \totalheight=\dimen144 LaTeX Font Info: External font cmex10' loaded for size (Font) &lt;12&gt; on input line 10. LaTeX Font Info: External fontcmex10' loaded for size (Font) <8> on input line 10. LaTeX Font Info: External font `cmex10' loaded for size (Font) <6> on input line 10. \width=\dimen145 \height=\dimen146 \depth=\dimen147 \totalheight=\dimen148 \width=\dimen149 \height=\dimen150 \depth=\dimen151 \totalheight=\dimen152 \width=\dimen153 \height=\dimen154 \depth=\dimen155 \totalheight=\dimen156 \curly@height=\dimen157 \half@curly@height=\dimen158 \curly@shift=\dimen159 \total@box@width=\dimen160 \width=\dimen161 \height=\dimen162 \depth=\dimen163 \totalheight=\dimen164 [1

{c:/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./mwe.aux))

Here is how much of LuaTeX's memory you used: 776 strings out of 478296 100000,383344 words of node,token memory allocated 646 words of node memory still in use: 13 hlist, 2 vlist, 2 rule, 6 math, 2 glue, 3 kern, 6 glyph, 9 attribute, 55 g lue_spec, 9 attribute_list, 1 write nodes avail lists: 2:271,3:18,4:2,5:90,6:12,7:466,8:3,9:322,11:6 21014 multiletter control sequences out of 65536+600000 34 fonts using 2864419 bytes 42i,11n,50p,123b,301s stack positions out of 5000i,500n,10000p,200000b,80000s <c:/texlive/2021/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf><c:/t exlive/2021/texmf-dist/fonts/opentype/public/lm/lmroman6-regular.otf><c:/texlive /2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb> Output written on mwe.pdf (1 page, 14454 bytes).

PDF statistics: 26 PDF objects out of 1000 (max. 8388607) 15 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 131072) 1 words of extra memory for PDF output out of 10000 (max. 100000000)

jopeto
  • 165
  • looks ok for me. Show your log-file. – Ulrike Fischer Aug 16 '21 at 11:40
  • @UlrikeFischer Could it be because I'm using the LuaLatex compiler? I need that since I am using fonts requiring lualatex (not included in the MWE). – jopeto Aug 16 '21 at 11:49
  • 2
    with lualatex I see your displacement, with pdflatex it is fine. – Ulrike Fischer Aug 16 '21 at 11:53
  • @UlrikeFischer Yes, I can confirm that indeed with pdfLatex it is working fine, while with LuaLatex there is a displacement. I guess I will contact the package maintainer to report the issue. – jopeto Aug 16 '21 at 11:56
  • The issue has already been reported about 8 years ago. It seems to stem from the glyph which LuaLatex is using for the curly brace: https://tex.stackexchange.com/questions/102645/how-is-bytefield-inducing-differences-between-pdf-and-xe-tex-and-luatex-and-wha – jopeto Aug 16 '21 at 12:08
  • Upon contacting the package maintainer, he sent me an updated version of the .sty package which fixes the issue. I imagine that he would incorporate that fix in a future package version which he releases on CTAN. – jopeto Aug 17 '21 at 08:14

0 Answers0