| 1 |
LaTeX3 Programming Conventions |
| 2 |
============================== |
| 3 |
|
| 4 |
Release 2026-05-15 |
| 5 |
|
| 6 |
Overview |
| 7 |
-------- |
| 8 |
|
| 9 |
The files of the `l3kernel` bundle provide an API for TeX programmers |
| 10 |
with defined syntax conventions, completely separating it from document level |
| 11 |
syntax. Hence, the commands provided are not intended for use at the document |
| 12 |
level nor for use in describing design layouts in document class files. |
| 13 |
|
| 14 |
This API provides the foundation on which new additions to the LaTeX kernel and |
| 15 |
other advanced extensions are built. The programming layer is designed to be |
| 16 |
loaded as part of LaTeX2e format building or as a loaded package with plain TeX |
| 17 |
or other formats. |
| 18 |
|
| 19 |
The syntax and functionality provided by `l3kernel` is regarded by the LaTeX |
| 20 |
team as stable. There may still be changes to some functions, but these will be |
| 21 |
very minor when compared to the scope of `l3kernel`. In particular, no functions |
| 22 |
will be removed, although some may be deprecated. |
| 23 |
|
| 24 |
|
| 25 |
Requirements |
| 26 |
------------ |
| 27 |
|
| 28 |
The `l3kernel` bundle requires the e-TeX extensions and a number of additional |
| 29 |
'utility' primitives, almost all of which were first added to pdfTeX. In |
| 30 |
particular, the functionality equivalent to the following pdfTeX primitives must |
| 31 |
be available |
| 32 |
|
| 33 |
- `\ifincsname` |
| 34 |
- `\ifpdfprimitive` |
| 35 |
- `\pdfcreationdate` |
| 36 |
- `\pdfelapsedtime` |
| 37 |
- `\pdffiledump` |
| 38 |
- `\pdffilemoddate` |
| 39 |
- `\pdffilesize` |
| 40 |
- `\pdflastxpos` |
| 41 |
- `\pdflastypos` |
| 42 |
- `\pdfmdfivesum` |
| 43 |
- `\pdfnormaldeviate` |
| 44 |
- `\pdfpageheight` |
| 45 |
- `\pdfpagewidth` |
| 46 |
- `\pdfprimitive` |
| 47 |
- `\pdfrandomseed` |
| 48 |
- `\pdfresettimer` |
| 49 |
- `\pdfsavepos` |
| 50 |
- `\pdfsetrandomseed` |
| 51 |
- `\pdfshellescape` |
| 52 |
- `\pdfstrcmp` |
| 53 |
- `\pdfuniformdeviate` |
| 54 |
|
| 55 |
For ease of reference, these primitives will be referred to as the 'pdfTeX |
| 56 |
utilities'. With the exception of `\expanded`, these have been present in pdfTeX |
| 57 |
since the release of version 1.40.0 in 2007; `\expanded` was added for TeX Live |
| 58 |
2019. Similarly, the full set of these utility primitives has been available in |
| 59 |
XeTeX from the 2019 TeX Live release, and has always been available in LuaTeX |
| 60 |
(some by Lua emulation). The Japanese pTeX and upTeX gained all of the above |
| 61 |
(except `\ifincsname`) for TeX Live 2019 and `\ifincsname` for TeX Live 2020. |
| 62 |
|
| 63 |
Starting from release 2023-05-15, the `\expanded` primitive is *required*. |
| 64 |
Its slow emulation has been removed. |
| 65 |
|
| 66 |
In addition to the above, engines which are fully Unicode-compatible |
| 67 |
must provide the functionality of the following primitives, documented in the |
| 68 |
LuaTeX manual |
| 69 |
|
| 70 |
- `\Uchar` |
| 71 |
- `\Ucharcat` |
| 72 |
- `\Umathcode` |
| 73 |
|
| 74 |
The existence of the primitive `\Umathcode` is used as the marker for Unicode |
| 75 |
support. |
| 76 |
|
| 77 |
Issues |
| 78 |
------ |
| 79 |
|
| 80 |
The issue tracker for LaTeX3 is currently located |
| 81 |
[on GitHub](https://github.com/latex3/latex3/issues). |
| 82 |
|
| 83 |
The LaTeX Project |
| 84 |
------------------ |
| 85 |
|
| 86 |
Development of LaTeX3 is carried out by |
| 87 |
[The LaTeX Project](https://www.latex-project.org/latex3/). |
| 88 |
|
| 89 |
The development team can be contacted |
| 90 |
by e-mail: <[email protected]>. |
| 91 |
|
| 92 |
----- |
| 93 |
|
| 94 |
<p>Copyright (C) 1998-2012,2015-2026 The LaTeX Project <br /> |
| 95 |
<a href="http://latex-project.org/">http://latex-project.org/</a> <br /> |
| 96 |
All rights reserved.</p> |