Debian Codegraph @

texmf-dist/doc/latex/l3kernel/l3news12.tex

raw
1 % Copyright 2019 The LaTeX3 Project
2 \documentclass{ltnews}
3
4 \usepackage{csquotes}
5 \usepackage{hologo}
6 \usepackage{ragged2e}
7
8 \PassOptionsToPackage{colorlinks}{hyperref}
9
10 %%% wrong in ltnews.cls ... so some tmp fix here at the moment:
11 \makeatletter
12 \renewcommand{\subsubsection}{%
13 \@startsection
14 {subsubsection}{2}{\leftmargini}{-1.5ex \@plus -1ex \@minus -.2ex}%
15 {1sp}{\@subheadingfont}%
16 }
17 \makeatother
18
19 \AtBeginDocument{%
20 \renewcommand*{\LaTeXNews}{\LaTeX3~News}%
21 \RaggedRight
22 \setlength\parindent{1em}%
23 }
24
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
27 \publicationmonth{January}
28 \publicationyear{2020}
29 \publicationissue{12}
30
31 % Avoid hyphenation of csnames
32 \makeatletter
33 \protected\edef\cs#1{%
34 \noexpand\path{\@backslashchar#1}%
35 }
36 \makeatother
37 \hyphenpenalty=10000
38 \exhyphenpenalty=10000
39 \hbadness=2500
40
41 \makeatletter
42 \renewcommand*\l@section[2]{%
43 \ifnum \c@tocdepth >\z@
44 \addpenalty\@secpenalty
45 \addvspace{0.7em \@plus\p@}% reduce from 1.0em
46 \setlength\@tempdima{1.5em}%
47 \begingroup
48 \parindent \z@ \rightskip \@pnumwidth
49 \parfillskip -\@pnumwidth
50 \leavevmode \bfseries
51 \advance\leftskip\@tempdima
52 \hskip -\leftskip
53 #1\nobreak\hfil
54 \nobreak\hb@xt@\@pnumwidth{\hss #2%
55 \kern-\p@\kern\p@}\par
56 \endgroup
57 \fi}
58 \makeatother
59
60 \newenvironment{compactitemize}%
61 {\begin{itemize}%
62 \setlength{\itemsep}{0pt}%
63 \setlength{\parskip}{0pt}%
64 \setlength{\parsep} {0pt}%
65 }%
66 {\end{itemize}}
67
68
69 \begin{document}
70
71 \maketitle
72
73 \tableofcontents
74
75 \section{Introduction}
76
77 There has been quite a gap since the last \emph{\LaTeX3 News} (Issue~11,
78 February 2018), and so there is quite a bit to cover here. Luckily, one of the
79 things there \emph{is} to cover is that we are using a more formalised approach
80 for logging changes, so writing up what has happened is a bit easier.
81 (By mistake \LaTeX3 News~11 itself did not get \emph{published} when written, but is
82 now available: we have kept the information it contains separate as it
83 is a good summary of the work that had happened in 2017.)
84
85 Work has continued apace across the \LaTeX3 codebase in the last (nearly) two
86 years. A lot of this is ultimately focussed on making the core of \pkg{expl3}
87 even more stable: \emph{squeezing} out more experimental ideas, refining
88 ones we have and making it a serious option for core \LaTeX{} programming.
89
90 As a result of these activities, the \LaTeX3 programming layer will be
91 available as part of the kernel of \LaTeXe{} from 2020-02-02 onwards, i.e., can
92 be used without explicitly loading \pkg{expl3}. See \emph{\LaTeX{}
93 News~31}~\cite{12:site-news} for more details on this.
94
95 \section{New features in \pkg{expl3}}
96
97 \subsection{A new argument specifier: \texttt{e}-type}
98
99 During 2018, the team worked with the \TeX{} Live, \hologo{XeTeX} and
100 (u)p\TeX{} developers to add the \cs{expanded} primitive to \hologo{pdfTeX}{},
101 \hologo{XeTeX} and (u)p\TeX{}. This primitive was originally suggested for
102 \hologo{pdfTeX}{} v1.50 (never released), and was present in \hologo{LuaTeX}{}
103 from the start of that project.
104
105 Adding \cs{expanded} lets us create a new argument specifier: \texttt{e}-type
106 expansion. This is \emph{almost} the same as \texttt{x}-type, but is itself
107 expandable. (It also doesn't need doubled \verb|#| tokens.) That's incredibly
108 useful for creating function-like macros: you can ensure that \emph{everything}
109 is expanded in an argument before you go near it, with not an \cs{expandafter}
110 in sight.
111
112 \subsection{New functions}
113
114 New programming tools have appeared in various places across \pkg{expl3}.
115 The highlights are
116 \begin{compactitemize}
117 \item Shuffling of sequences to allow randomization
118 \item Arrays of integers and floating point values; these have constant-time
119 access
120 \item Functions to return values after system shell usage
121 \item Expandable access to file information, including file size, MD5
122 hash and modification date
123 \end{compactitemize}
124
125 For the latter, we have revised handling of file names considerably. There is
126 now support for finding files in expansion contexts (by using the
127 \cs{(pdf)filesize} primitive). Spaces and quotes in file names are now fully
128 normalised, in a similar manner to the approach used by the latest \LaTeXe{}
129 kernel.
130
131 \subsection{String conversion moves to \pkg{expl3}}
132
133 In addition to entirely new functions, the team have moved the
134 \pkg{l3str-convert} module from the \pkg{l3experimental} bundle into the
135 \pkg{expl3} core. This module is essential for dealing with the need to produce
136 UTF-16 and UTF-32 strings in some contexts, and also offers
137 built-in escape for url and PDF strings.
138
139 \subsection{Case changing of text}
140
141 Within \pkg{expl3}, the team have renamed and reworked the ideas from
142 \cs{tl_upper_case:n} and so on, creating a new module \pkg{l3text}. This is a
143 \enquote{final} home for functions to manipulate \emph{text}; token lists that
144 can reasonably be expected to expand to plain text plus limited markup, for
145 example emphasis and labels/references. Moving these functions, we have also
146 made a small number of changes in other modules to give consistent names to
147 functions: see the change log for full details.
148
149 Over time, we anticipate that functions for other textual manipulation will be
150 added to this module.
151
152 \section{Notable fixes and changes}
153
154 \subsection{File name parsing}
155
156 The functions for parsing file names have been entirely rewritten, partly as
157 this is required for the expandable access to file information mentioned above.
158 The new code correctly deals with spaces and quote marks in file names and
159 splits the path/name/extension.
160
161 \subsection{Message formatting}
162
163 The format of messages in \pkg{expl3} was originally quite text-heavy, the idea
164 being that they would stand out in the \texttt{.log} file. However, this made
165 them hard to find by a regular expression search, and was very different from
166 the \LaTeXe{} message approach. The formatting of \pkg{expl3} messages has been
167 aligned with that from the \LaTeXe{} kernel, such that IDE scripts and
168 similar will be able to find and extract them directly.
169
170 \subsection{Key inheritance}
171
172 A number of changes have been made to the inheritance code for keys,
173 to allow inheritance to work \enquote{as expected} in (almost) all
174 cases.
175
176 \subsection{Floating point juxtaposition}
177
178 Implicit multiplication by juxtaposition, such as \verb|2pi|, is now handled
179 separately from parenthetic values. Thus for example \verb|1in/1cm| is treated
180 as equal to \verb|(1in)/(1cm)| and thus yields \verb|2.54|, and \verb|1/2(pi+pi)| is
181 equal to \verb|pi|.
182
183 \subsection{Changing box dimensions}
184
185 \TeX{}'s handling of boxes is subtly different from other registers, and this
186 shows up in particular when you want to resize a box. To bring treatment of
187 boxes, or rather the grouping behavior of boxes, into line with other
188 registers, we have made some internal changes to how functions such as
189 \cs{box_set_wd:N} are implemented. This will be transparent for
190 \enquote{well-behaved} use cases of these functions.
191
192 \subsection{More functions moved to stable}
193
194 A large number of functions which were introduced as candidates have been
195 evaluated and moved to stable status. The team hopes to move all functions
196 in \pkg{expl3} to stable status, or move them out of the core, over the coming
197 months.
198
199 \subsection{Deprecations}
200
201 There have been two notable sets of deprecations over the past 18 months.
202 First, we have rationalised all of the \enquote{raw} primitive names to the
203 form \cs{tex_<name>:D}. This means that the older names, starting
204 \mbox{\cs{pdftex_...}}, \cs{xetex_...}, etc., have been removed.
205
206 Secondly, the use of integer constants, which dates back to the earliest days
207 of \pkg{expl3}, is today more likely to make the code harder to read than
208 anything else. Speed improvements in engines mean that the tiny enhancements in
209 reading such constants are no longer required. Thus for example \cs{c_two} is
210 deprecated in favour of simply using \texttt{2}.
211
212 In parallel with this, a number of older \texttt{.sty} files have been removed.
213 These older files provided legacy stubs for files which have now been
214 integrated in the \pkg{expl3} core. They have now had sufficient time to allow
215 users to update their code.
216
217 \section{Internal improvements}
218
219 \subsection{Cross-module functions}
220
221 The team introduced the idea of internal module functions some time ago. Within
222 the kernel, there are places where functions need to be used in multiple
223 modules. To make the nature of the kernel interactions clearer, we have worked
224 on several aspects
225 \begin{compactitemize}
226 \item Reducing as far as possible cross-module functions
227 \item Making more generally-useful functions public, for example
228 scan marks
229 \item Creating an explicit cross-kernel naming convention for
230 functions which are internal but are essential to use in multiple
231 kernel modules
232 \end{compactitemize}
233
234 \subsection{The backend}
235
236 Creating graphics, working with color, setting up hyperlinks and so on require
237 backend-specific code. Here, backends are for example \texttt{dvips},
238 \texttt{xdvipdfmx} and the direct PDF mode in \hologo{pdfTeX} and
239 \hologo{LuaTeX}. These functions are needed across the \LaTeX3 codebase and
240 have to be updated separately from the \pkg{expl3} core. To facilitate that, we
241 have split those sources into a separate bundle, which can be updated as
242 required.
243
244 At the same time, the code these files contain is very low-level and is best
245 described as internal. We have re-structured how the entire set of functions
246 are referred to such that they are now internal for the area they implement,
247 for example image inclusion, box affine transformations, etc.
248
249 \section{Better support for (u)p\texorpdfstring{\kern-.05em}{}\TeX{}}
250
251 The developers behind (u)p\TeX{} (Japanese \TeX{}) have recently enhanced their
252 English documentation (see \url{https://github.com/texjporg/ptex-manual}).
253 Using this new information, we have been able to make internal adjustments to
254 \pkg{expl3} to better support these engines.
255
256 \section{Options}
257
258 A new option \texttt{undo-recent-deprecations} is now available for cases where
259 a document (or package) requires some \pkg{expl3} functions that have been
260 formally removed after deprecation. This is to allow \emph{temporary}
261 work-arounds for documents to be compiled whilst code is begin updated.
262
263 The \enquote{classical} options for selecting backends (\texttt{dvips},
264 \texttt{pdftex}, etc.)\ are now recognised in addition to the native key--value
265 versions. This should make it much easier to use the \pkg{expl3} image and color
266 support as it is brought up to fully-workable standards.
267
268 \section{Engine requirements}
269
270 The minimum engine versions needed to use \pkg{expl3} have been
271 incremented a little:
272 \begin{compactitemize}
273 \item \hologo{pdfTeX} v1.40
274 \item \hologo{XeTeX} v0.99992
275 \item \hologo{LuaTeX} v0.95
276 \item $\varepsilon$-(u)p\TeX{} mid-2012
277 \end{compactitemize}
278
279 The team have also worked with the \hologo{XeTeX} and (u)p\TeX{} developers to
280 standardise the set of post-\eTeX{} utility primitives that are available: the
281 so-called \enquote{\hologo{pdfTeX} utilities}. These are now available in all
282 supported engines, and in time will all be \emph{required}. This primarily
283 impacts \hologo{XeTeX}, which gained most of these primitives in the 2019
284 \TeX{} Live cycle. (Examples are the random number primitives and expandable
285 file data provision.) See \emph{\LaTeX{} News~31}~\cite{12:site-news}
286 for more.
287
288 \section{Documentation}
289
290 \subsection{News}
291
292 The \emph{\LaTeX3 News} files were until recently only used to create
293 PDF files on the team website~\cite{12:site}. We have now
294 integrated those into the \pkg{l3kernel} (\pkg{expl3} core)
295 bundle. The news files cover all of \LaTeX3 files, as the core files
296 are always available.
297
298 \subsection{ChangeLog}
299
300 Since the start of 2018, the team have commenced a comprehensive
301 change log for each of the bundles which make up the \LaTeX3 code.
302 These are simple Markdown text files, which means that they can be displayed
303 formatted in web views.
304
305 \section{Changes in \pkg{xparse}}
306
307 A number of new features have been added to \pkg{xparse}. To allow
308 handling of the fact that skipping spaces may be required only in
309 some cases when searching for optional arguments, a new modifier
310 \texttt{!} is available in argument specifiers. This causes
311 \pkg{xparse} to \emph{require} that an optional argument follows
312 immediately with no intervening spaces.
313
314 There is a new argument type purely for environments: \texttt{b}-type
315 for collecting a \cs{begin}\texttt{...}\cs{end} pair, i.e., collecting the body of
316 an environment. This is similar in concept to the \pkg{environ} package,
317 but is integrated directly into \pkg{xparse}.
318
319 Finally, it is now possible to refer to one argument as the
320 default for another optional one, for example
321 \begin{verbatim}
322 \NewDocumentCommand{\caption}{O{#2} m} ...
323 \end{verbatim}
324
325 \section{New experimental modules}
326
327 A number of new experimental modules have been added within the
328 \pkg{l3experimental} bundle:
329 \begin{description}
330 \item[\pkg{l3benchmark}] Performance-testing system using the timing
331 function in modern \TeX{} engines
332 \item[\pkg{l3cctab}] Category code tables for all engines, not
333 just \hologo{LuaTeX}
334 \item[\pkg{l3color}] Color support, similar in interface to \pkg{xcolor}
335 \item[\pkg{l3draw}] Creation of drawings, inspired by \pkg{pgf}, but
336 using the \LaTeX3 FPU for calculations
337 \item[\pkg{l3pdf}] Support for PDF features such as compression,
338 hyperlinks, etc.
339 \item[\pkg{l3sys-shell}] Shell escape functions for file manipulation
340 \end{description}
341
342 \section{\pkg{l3build} changes}
343
344 The \pkg{l3build} tool for testing and releasing \TeX{} packages
345 has seen a number of incremental improvements. It is now available directly
346 as a script in \TeX{} Live and MiK\TeX{}, meaning you can call it simply
347 as
348 \begin{verbatim}
349 l3build <target>
350 \end{verbatim}
351 Accompanying this, we have added support for installing scripts and script
352 \texttt{man} files.
353
354 There is a new \texttt{upload} target that can take a zip file and send it to
355 CTAN: you just have to fill in release information for \emph{this}
356 upload at the prompts.
357
358 Testing using PDF files rather than logs has been heavily revised:
359 this is vital for work on PDF tagging.
360
361 There is also better support for complex directory structures, including the
362 ability to manually specify TDS location for all installed files. This
363 is particularly targeted at packages with both generic and format-specific files
364 to install.
365
366
367 \begin{thebibliography}{9}
368
369 \fontsize{9.9}{11.9}\selectfont
370
371
372 \bibitem{12:site}
373 \emph{\LaTeX{} Project Website}.
374 \hfil\break\url{https://latex-project.org/}
375
376 \bibitem{12:site-news}
377 \emph{\LaTeXe{} release newsletters on the \LaTeX{} Project Website}.
378 \url{https://latex-project.org/news/latex2e-news/}
379
380
381 \end{thebibliography}
382
383 \end{document}