e-TeX provides lots of additional features for package writers such as an increased number of registers. The thing I find most useful is its extended tracing ability which I usually access through the trace
package. In particular, tracing commands and tracing assignments are extremely helpful when trying to diagnose a problem.
e-TeX also provides a \middle
delimiter that works like \left
and \right
which can be helpful.
\[\left\{\sum_{i=0}^n a_i\ \middle|\ a_0<a_1<\dotsb<a_n\right\}\]
Edit: While writing an answer to another question, I just remembered two pretty useful extensions in e-TeX. The first is \unless
which lets you negate the arms of an \if
. It's especially useful in loops where you want to loop unless some condition is true. Reading files was my example.
\loop\unless\ifeof\file
\readline\file to\foo
% Do something with \foo
\repeat
This also shows the second of the two extensions: \readline
. It acts exactly like \read
except that all of the characters are given category code other or space. It's very handy for reading in text that contains characters like $
, %
, ^
, &
, _
, or \
. For example, here's a cheater's quine.
\newread\file
\openin\file\jobname
\endlinechar-1
\tt
\loop\unless\ifeof\file
\readline\file to\foo
\noindent\foo\endgraf
\repeat
\bye
There are other category changing commands like \scantokens
and \detokenize
, but I've never used either.
Best Answer
Since the 2020-10-01 release, most of[1]
xparse
(rebranded asltcmd
) is built into the LaTeX kernel, so\NewDocumentCommand
is available out of the box (see section Providingxparse
in the format in the ltnews32).1: Some argument types, considered bad practice, were considered deprecated and not moved to the kernel (see this blog post on that). To use these argument types you still have to load the
xparse
package.