l3packages
Provides legacy support for high-level LaTeX3 programming concepts and interfaces that have since been integrated into the LaTeX kernel.
Overview
Historically significant for LaTeX3 development, this collection maintains compatibility for documents using older implementations of advanced LaTeX features. While its core functionality has been absorbed into the modern LaTeX kernel, it remains relevant for supporting legacy documents and understanding LaTeX3's evolution.
- Originally introduced key programming interfaces and document design concepts for LaTeX3.
- Includes historical implementations of packages like l3keys2e, xfp, xparse, and xtemplate.
- Primarily useful for maintaining backward compatibility with documents created before these features were integrated into the kernel.
- Serves as a reference point for understanding the development and standardization of LaTeX3 programming interfaces.
Getting Started
The l3packages
collection contains LaTeX3 packages that have now been incorporated into the LaTeX kernel. These packages are retained for backward compatibility with older documents.
For modern LaTeX documents (with LaTeX kernel from 2022-06-01 or later), you don't need to load these packages explicitly as their functionality is now built into the LaTeX kernel.
For older documents or if you need to ensure compatibility with older LaTeX distributions, you can load specific packages from this collection:
\documentclass{article}
\usepackage{xparse} % For document command interfaces
\usepackage{l3keys2e} % For key-value interface
\usepackage{xfp} % For floating point calculations
\usepackage{xtemplate} % For template programming
Examples
Using xparse (part of l3packages) to define a custom document command with optional arguments.
\documentclass{article}
\usepackage{xparse}
\begin{document}
% Define a custom command with optional arguments
\NewDocumentCommand{\person}{o m o}{%
\IfNoValueTF{#1}
{#2}
{#1~#2}%
\IfValueT{#3}{, #3}%
}
\person{John Smith} \par
\person[Dr.]{Jane Doe}[PhD] \par
\person[Professor]{Robert Johnson}[Department of Mathematics]
\end{document}