6
  1. Is expl3 implemented directly in TeX, or does it tap into LaTeX2e as well?

  2. Is it necessary to know anything about LaTeX2e in order to learn LaTeX3? Is LaTeX3 designed to be learned independently of LaTeX2e?

  3. Is LaTeX3 supposed to replace LaTeX2e, or to complement it? If it is the latter, what aspects of LaTeX2e are not planned to be superseded by LaTeX3, and what aspects are supposed to be superseded by LaTeX3?


* The first two questions could have been reworded as follows.

Is it possible to avoid loading expl3 via LaTeX2e, and do it directly in TeX via \input expl3.tex or some similar command? If this is possible, will then all the features of expl3 be available for use, or will some of it will not work, not work correctly, or not work fully?

closed as too broad by Henri Menke, Stefan Pinnow, TeXnician, Jesse, user31729 Aug 26 '17 at 20:46

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

4
  1. No, it only uses primitives.
  2. No and not yet decided.
  3. Yes and not yet decided.

You can dump a format from the current expl3 but it will just do nothing because it doesn't provide basic things like an output routine. If you are already running some format (Plain TeX, LaTeX2e, ConTeXt, lollipop, etc) you can input the expl3 macro package and use everything it provides.


I think you are asking whether there exists a format which has expl3 preloaded, to which the answer is no.

  • I'm sorry, but I don't understand your answer to question no. 1. Does "no" mean that expl3 is not implemented directly in TeX, or does it mean that it doesn't tap into LaTeX2e? – Evan Aad Aug 26 '17 at 5:07
  • @EvanAad I clarified the first point. – Henri Menke Aug 26 '17 at 5:12
  • Thanks. So it is possible to load expl3 in plain TeX via \input expl3.tex, and all the features of expl3 be available for use fully and correctly, right? – Evan Aad Aug 26 '17 at 5:34
  • @EvanAad Yes, you dump expl3 into a format and preloaded that when starting TeX, but it's not that useful because you cannot typeset anything. If you are running with the »Plain TeX« format preloaded (default when typing tex on the command line and hitting enter) then you have to \input expl3-generic.tex to be able to use it. – Henri Menke Aug 26 '17 at 5:38
  • @HenriMenke Well you can typeset something with the very experimental format, it's just a pain and not that useful. (I really should sort out pattern loading for example.) – Joseph Wright Aug 26 '17 at 13:29
8

First, it's worth remembering that LaTeX3 is a long-term project and has the goal of creating a stand-alone set up. However, at this stage that is not what we have: expl3 is the main 'product' of the team. The expl3 language is the programming layer for LaTeX3, but is usable as a LaTeX2e package. The latter point is important: to get work moving forward, the team need people to actually use the code, and that means making it work with current documents. Note that there are LaTeX3 products beyond expl3, most obviously xparse.

  1. expl3 is set up as a stand-alone language which is implemented by first renaming all of the TeX primitives (see l3names.dtx) then using these to bootstrap the language. When loaded as a LaTeX2e package, there are some places that the mechanisms of the format are important (for example the register allocator), and they are therefore used. (expl3 is TeX-based in the same way as plain TeX or LaTeX2.)

  2. The aim is that eventually expl3 will be entirely self-documented. However, at present this is not the case. One way or another, one does need to be familiar with fundamental TeX concepts such as tokenisation, expansion, etc. Depending on what the aim of the code written is, one may also need other LaTeX2e knowledge: for example, if you want to use expl3 to work with different fonts, you will at present need to use the LaTeX2e NFSS.

  3. As stated at the start of this answer, the long term goal of the team is to create a stand-alone product. However, this will only be worthwhile if users can migrate to it. Much of the ongoing development work is therefore focussed on 'LaTeX3-in-2e', that is to say package code which can be used with LaTeX2e. Some of that is somewhat 'experimental' (as it does not 'play nicely' with the full set of LaTeX2e packages: see e.g. xgalley) while large parts are entirely self-contained (expl3, xparse). Over time the team are implementing a wide range of ideas for expl3/LaTeX3: for example, I am currently (August 2017) working on image inclusion.

Finally, some parts of the code (expl3) can be used in formats other than LaTeX whilst other parts (xparse, xgalley) cannot as they rely to some extent on LaTeX2e concepts. Much of the code could be made entirely generic but there are questions about the usefulness of this: most TeX users use LaTeX2e, and those who use other formats probably do not want to use these types of libraries.

Not the answer you're looking for? Browse other questions tagged or ask your own question.