Debian Codegraph @

texmf-dist/doc/latex/l3kernel/l3syntax-changes.tex

raw
1 \iffalse meta-comment
2
3 File: l3syntax-changes.tex
4
5 Copyright (C) 2011,2012,2017-2026 The LaTeX Project
6
7 It may be distributed and/or modified under the conditions of the
8 LaTeX Project Public License (LPPL), either version 1.3c of this
9 license or (at your option) any later version. The latest version
10 of this license is in the file
11
12 https://www.latex-project.org/lppl.txt
13
14 This file is part of the "l3kernel bundle" (The Work in LPPL)
15 and all files in that bundle must be distributed together.
16
17 The released version of this bundle is available from CTAN.
18
19 \fi
20
21 \documentclass{l3doc}
22
23
24 \title{%
25 Syntax changes in \LaTeX3 functions%
26 }
27 \author{%
28 The \LaTeX{} Project\thanks
29 {%
30 E-mail:
31 \href{mailto:[email protected]}%
32 {[email protected]}%
33 }%
34 }
35 \date{Released 2026-05-15}
36
37 \newcommand{\TF}{\textit{(TF)}}
38
39 \begin{document}
40
41 \maketitle
42
43 This file describes functions that were expected to be completely
44 stable, but whose syntax has changed in ways that may potentially
45 require code relying on them to be changed. This file does not include
46 bug-fixes, nor backward-compatible extensions of the syntax,
47 nor functions that were completely
48 deprecated: the latter are listed in \texttt{l3obsolete.txt}. Only
49 changes after August 2011 are listed, with an approximate date.
50
51 \section{August 2011}
52
53 \begin{itemize}
54 \item \cs{tl_if_single:n\TF} recognized any non-zero number of
55 explicit spaces as \meta{true}, and did not ignore trailing spaces.
56 Now it is \meta{true} for
57 \[
58 \meta{optional spaces}
59 \meta{normal token or brace group}
60 \meta{optional spaces}.
61 \]
62 \item \cs{tl_reverse:n} stripped outer braces and lost unprotected spaces.
63 Now it keeps spaces, leaves unbraced single tokens unbraced, and
64 braced groups braced.
65 \item \cs{tl_trim_spaces:n} only removed one leading and trailing space.
66 Now removes recursively. Also, on the left it used to strip implicit
67 and explicit spaces with any character code. Now it strips only explicit
68 space characters $(32,10)$.
69 \end{itemize}
70
71 \section{September 2011}
72
73 \begin{itemize}
74 \item clist functions which receive an \texttt{n}-type comma list argument
75 now trim spaces from each item in the argument.
76 \end{itemize}
77
78 \section{May 2012}
79
80 \begin{itemize}
81 \item The \pkg{l3fp} code has been completely rewritten with a new
82 expandable interface.
83 \item Getting/popping from a comma list or sequence or property list
84 that is empty (or missing the given key) now gives the quark
85 \cs{q_no_value}.
86 \end{itemize}
87
88 \section{June 2012}
89
90 \begin{itemize}
91 \item Access to list functions now indexes from~$1$, not from~$0$.
92 This applies to multiple choices in the \pkg{l3keys} module and
93 the \cs{clist_item:Nn}, \cs{seq_item:Nn} and \cs{tl_item:Nn}
94 functions.
95 \item \cs{tl_trim_spaces:n} now requires a variable number of
96 expansions to fully expand, rather than exactly two. Of course,
97 \texttt{x}-type or \texttt{e}-type expansion still correctly evaluates this function.
98 \end{itemize}
99
100 \section{July 2012}
101
102 \begin{itemize}
103 \item The \cs{tl_if_head_eq_meaning:nN}, \cs{tl_if_head_eq_catcode:nN}
104 and \cs{tl_if_head_eq_charcode:nN} conditionals now never match when
105 their first argument is empty.
106 \end{itemize}
107
108 \section{August 2012}
109
110 \begin{itemize}
111 \item \cs{lua_now:x} is now a standard \texttt{x}-type expansion of
112 \cs{lua_now:n}, which does no expansion. Engine-level expansion is moved
113 to \cs{lua_now:e}, reflecting the fact that this is non-standard in the
114 same way as for example \cs{str_if_eq_x:nn(TF)}.
115 \end{itemize}
116
117 \section{December 2013}
118
119 \begin{itemize}
120 \item In \pkg{l3fp} expressions, the badly named functions |round0|,
121 |round-|, |round+| are now named |trunc|, |floor|, |ceil|.
122 \end{itemize}
123
124 \section{May 2014}
125
126 \begin{itemize}
127 \item Now \cs{int_step_function:nnnN} evaluates its first three
128 arguments (start, step, stop) up front, rather than evaluating them
129 at each step in the loop. The same holds for the related mappings
130 \cs{int_step_inline:nnnn}, \cs{int_step_variable:nnnNn}, and their
131 analogues for \texttt{dim} and \texttt{fp} datatypes.
132 \end{itemize}
133
134 \section{July 2014}
135
136 \begin{itemize}
137 \item In \pkg{l3fp} expressions, juxtaposition is interpreted as
138 multiplication. Now the precedence of juxtaposition is set to be
139 the same as if there was an explicit multiplication
140 sign~\texttt{*}. Previously, juxtaposition would bound more tightly
141 than any other operation.
142 \end{itemize}
143
144 \section{August 2015}
145
146 \begin{itemize}
147 \item The \cs{hbox:n} and related \pkg{l3box} commands now take an
148 \texttt{n}-type argument and provide it braced to the underlying
149 \TeX{} primitive. The functions \cs{hbox:w} and \cs{hbox_end:} in
150 contrast do not read the contents of the box as a macro argument.
151 \end{itemize}
152
153 \section{2016}
154
155 No change.
156
157 \section{July 2017}
158
159 \begin{itemize}
160 \item Boolean expressions are now evaluated eagerly, namely both
161 operands of logical \texttt{and} (|&&|) and \texttt{or} (\verb"||")
162 are evaluated even when the result of the logical operation is fixed
163 after determining the first operand. For lazy evaluation,
164 \cs{bool_lazy_and_p:nn} and related functions are provided.
165 \end{itemize}
166
167 \section{November 2017}
168
169 \begin{itemize}
170 \item Spaces are now preserved inside keys in \pkg{l3keys}, and
171 trimmed at both ends.
172 \item \cs{cs_generate_variant:Nn} is now stricter: it only allows to
173 change \texttt{N}-type arguments to \texttt{c}, and \texttt{n} to
174 \texttt{o}, \texttt{V}, \texttt{v}, \texttt{f}, \texttt{x}. On the
175 one hand the latter argument types typically give rise to more than
176 one token, not suitable for use by an \texttt{N}-type base function.
177 On the other hand, \texttt{c} variants of \texttt{n} arguments
178 should often be \texttt{v} variants (when the argument is eventually
179 evaluated) or mistakes where the programmer thought the base
180 function was \texttt{N}-type.
181 \end{itemize}
182
183 \section{February 2020}
184
185 \begin{itemize}
186 \item \cs{keyval_parse:NNn} now works by expansion, returning
187 the parsed list inside \cs{exp_not:n}.
188 \end{itemize}
189
190 \section{July 2025}
191
192 \begin{itemize}
193 \item Colons (|:|) are no longer allowed in key names in \pkg{l3keys},
194 instead one can use |:| followed by a single letter expansion specifier
195 after the key name to control the expansion of the value.
196 \end{itemize}
197
198 \end{document}