[tex-k] e-TeX \lastnodetype initialization problem

Hironobu Yamashita aminophen15 at yahoo.co.jp
Sat Mar 24 01:42:55 CET 2018


e-TeX primitive \lastnodetype is not working as documented at the start of programs
on WEB2C implementation of pdfTeX, XeTeX and e-pTeX/e-upTeX.
(Only LuaTeX is ok.)
When the current list is empty, \lastnodetype should return -1 instead of 0.

\showthe\lastnodetype % => 0 ??
\showlists % => empty

Hironori Kitagawa found the following issue:

etexdir/etex.ch modifies `@<Start a new current page@>` by

@x [45] m.991 l.19353 - e-TeX last_node_type
last_glue:=max_halfword; last_penalty:=0; last_kern:=0;
last_glue:=max_halfword; last_penalty:=0; last_kern:=0;

However, tex.ch (WEB2C change file) overrides it so the change has no effect;

@x [16.215] l.4344 - remove mem[] reference from initialize.
prev_graf:=0; shown_mode:=0;
@<Start a new current page@>;
prev_graf:=0; shown_mode:=0;
@/{The following piece of code is a copy of module 991:}
page_contents:=empty; page_tail:=page_head; {|link(page_head):=null;|}@/
last_glue:=max_halfword; last_penalty:=0; last_kern:=0;
page_depth:=0; page_max_depth:=0;

A patch for
* etexdir/tex.ech
* pdftexdir/pdftex.ch
* xetexdir/xetex.ch
is attached.

Best regards,
Hironobu Yamashita

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20180323-etex_init_lastnodetype.patch
Type: application/octet-stream
Size: 1758 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-k/attachments/20180324/7169e165/attachment.obj>
-------------- next part --------------

More information about the tex-k mailing list