[Tex/LaTex] Where I can find introduction to programming in expl3

expl3latex3

Is there an introduction to programming in expl3?
I saw http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/l3kernel/expl3.pdf
but it doesn't discuss control structures (For example does it supersede ifthen package?) nor has any examples.

On a more specific note, ifthen package commands do not work inside of some tikz code, and I hoped that expl3 may remedy that.

This general question was asked before, but it was 9 years ago, so perhaps there is a better answer now? Where can I find the LaTeX3 manual?

Best Answer

Your question is a ominous mixture of multiple misconceptions about expl3.

First of all, the expl3.pdf document is the design document of expl3 which explains the rationale behind the architecture and how to use it. By virtue of its purpose expl3.pdf of course does not discuss control structures, which is the task of the reference manual interface3.pdf.

Next, expl3 does not supersede the ifthen package, just like apples do not supersede oranges. They are complementary approaches to the same problem. Therefore they should also not be mixed unless you understand the implications.

Finally you should avoid mixing TikZ code and expl3, again because of clashes in the design philosophy. One notorious gotcha in the TeX world is the “spurious space” problem, which expl3 solves by ignoring all whitespace within \ExplSyntaxOn...Off. However, this is incompatible with any other code that relies on the existence of whitespace, such as pgfkeys which form the fundamentals of TikZ. Nevertheless it is possible to make the two work together reasonably well, but this requires the user to write appropriate wrappers which join the space-less and the space-ful world.

Related Question