Maybe this question is just not a good idea in general, but, I'm curious. This could make package development simpler for some in the future. (Of course, this would not be forced on any package developer, but he/she could choose to use this approach or the traditional approach.) I guess the real key is that it could provide additional options for those who wished to use them.
Numerous packages1, including two I use quite frequently (pgf
and pgfplots
) are implemented in a generic way that makes them usable with multiple formats. In the case of pgf
/pgfplots
, these "packages" work equally well in Plain TeX, LaTeX, and ConTeXt documents.
To accomplish this goal (ensuring compatibility with many formats), the code uses TeX primitives for implementation as a "common denominator". As a result, the code is full of \expandafter
s, end-of-line %
s, and all sorts of other TeX programming constructs that expl3
syntax aims to abstract away from the programmer. (Not unlike LaTeX's original aim of abstracting these away from the typical document author.)
Along the lines of miniltx
and eplain
, I imagine that all or some subset of expl3
might be provided for use by format-agnostic package developers. When researching this question, I discovered that this possibility seems to be already available in the form of expl3-generic.tex
that \input
s the core expl3
code (expl3-code.tex
) in a format-neutral way.
- Was this design choice made with these types of uses in mind, or was there another reason to structure the code in this way? (Ease of low-level testing, for instance.)
- Do any current or in-development sets of format-neutral macros ("packages") use this approach?
- Finally, along the lines of the title: Is this a recommended practice? Should format-neutral packages (at the discretion of their authors, of course) use
expl3
syntax/conventions internally?
1 Check your TDS tree at texmf-dist/tex/generic
for some examples.
expl3
is designed to be format-agnostic, but it does require e-TeX.lt3graph
, for the most part