[tex-live] etex

David Carlisle d.p.carlisle at gmail.com
Wed Jan 11 13:39:08 CET 2017

> to my dismay, xelatex and lualatex seem to follow suit regarding missing
\fi's or missing \endgroup's not changing exit status from 0.

Like most programs they give 0 if the program only made warnings and not

It's easy enough to make these things an error via macros, in which case
the exit status is non zero.

For example the following plain tex with any engine supporting etex

\errmessage{if nesting is \the\numexpr\currentiflevel-1\relax}%

\if aa %\fi

will run without warning or error if you uncomment the \fi but as it is you
get an error status of 1 as shown by

$ pdftex --interaction=scrollmode er.tex; echo exit status = $?
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded
 restricted \write18 enabled.
entering extended mode
! if nesting is 1.
\bye ...s \the \numexpr \currentiflevel -1\relax }
                                                  \fi \end
l.11 \bye

(\end occurred when \if on line 10 was incomplete)
(see the transcript file for additional information)
No pages of output.
Transcript written on er.log.
exit status = 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20170111/58caed40/attachment.html>

More information about the tex-live mailing list