On 7/5/2018 10:27, Hans Hagen wrote: > On 7/4/2018 3:17 PM, Rik Kabel wrote: >> The following example fails with recent betas, but not with TL18: > define fails Sorry to be so terse in the original note. By failure, I mean that the generated .epub document is incorrect; parts are out of order, as: (When one section is removed, the disorder is gone, so a smaller test file will not exhibit this problem.) In a larger document, endnotes are scrambled as well, with two index marks for some and none for others. The generated .pdf (which is a throw-away when trying to produce epub) does not show the same problems. The .epub file is attached. -- RIk