4

What is the purpose of restoring the initial value of \prevdepth at the end of a horizontal alignment:

\prevdepth=.1234pt
\everycr{\noalign{\dimen0=\prevdepth prevdepth in noalign: \the\dimen0}}
\halign{%
\strut #\strut%
\cr
Text in a horizontal alignment%
\cr}
\dimen0=\prevdepth prevdepth after horizonal alignment: \the\dimen0
\bye

enter image description here

EDIT:

Above output was produced by LuaTeX version beta-0.79.1.

  • think of this more generally -- the argument of \halign is a local group. all temporary settings are abandoned when a group is closed. if a setting needs to be preserved after the group is closed, it must intentionally be set globally. – barbara beeton Oct 22 '14 at 12:40
  • 1
    @barbarabeeton The TeXbook, p. 282: “The value of \prevdepth at the time of the \halign is used at the beginning of the internal vertical list, and the final value of \prevdepth is carried to the enclosing vertical list when the alignment is completed, so that the interline glue is calculated properly at the beginning and end of the alignment.” Indeed, the value shown when TeX is used (as opposed to LuaTeX) is 1.9444pt (the same with XeTeX). – egreg Oct 22 '14 at 15:04
  • @egreg -- okay. so this is a bug only in luatex. thanks. (guess i have to go back to reading the basics ... in my voluminous free time.) – barbara beeton Oct 22 '14 at 16:16
4

This looks like an issue with the engine that has been reported here and will be fixed in the next release.

Your Answer

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

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