Debian Codegraph @

texmf-dist/source/latex/l3kernel/l3names.dtx

raw
1 % \iffalse meta-comment
2 %
3 %% File: l3names.dtx
4 %
5 % Copyright (C) 1990-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 % -----------------------------------------------------------------------
18 %
19 % The development version of the bundle can be found at
20 %
21 % https://github.com/latex3/latex3
22 %
23 % for those people who are interested.
24 %
25 %<*driver>
26 \documentclass[full,kernel]{l3doc}
27 \begin{document}
28 \DocInput{\jobname.dtx}
29 \end{document}
30 %</driver>
31 % \fi
32 %
33 % \title{^^A
34 % The \pkg{l3names} module\\ Namespace for primitives^^A
35 % }
36 %
37 % \author{^^A
38 % The \LaTeX{} Project\thanks
39 % {^^A
40 % E-mail:
41 % \href{mailto:[email protected]}
42 % {[email protected]}^^A
43 % }^^A
44 % }
45 %
46 % \date{Released 2026-05-15}
47 %
48 % \maketitle
49 %
50 % \begin{documentation}
51 %
52 % \section{Setting up the \LaTeX3 programming language}
53 %
54 % This module is at the core of the \LaTeX3 programming language. It
55 % performs the following tasks:
56 % \begin{itemize}
57 % \item defines new names for all \TeX{} primitives;
58 % \item emulate required primitives not provided by default in \LuaTeX;
59 % \item switches to the category code r{\'e}gime for programming;
60 % \end{itemize}
61 %
62 % This module is entirely dedicated to primitives (and emulations of
63 % these), which should not be used directly within \LaTeX3 code
64 % (outside of \enquote{kernel-level} code). As such, the primitives
65 % are not documented here: \emph{The \TeX{}book}, \emph{\TeX{} by
66 % Topic} and the manuals for \pdfTeX{}, \XeTeX{}, \LuaTeX{}, \pTeX{}
67 % and \upTeX{} should be consulted for details of the primitives.
68 % These are named \cs[no-index]{tex_\meta{name}:D}, typically based
69 % on the primitive's \meta{name} in \pdfTeX{} and omitting a leading
70 % |pdf| when the primitive is not related to pdf output.
71 %
72 % \end{documentation}
73 %
74 % \begin{implementation}
75 %
76 % \section{\pkg{l3names} implementation}
77 %
78 % The prefix here is \texttt{kernel}. A few places need |@@| to be left
79 % as is; this is obtained as |@@@@|.
80 % \begin{macrocode}
81 %<@@=kernel>
82 % \end{macrocode}
83 %
84 % \begin{macrocode}
85 %<*code>
86 % \end{macrocode}
87 %
88 % The code here simply renames all of the primitives to new, internal,
89 % names.
90 %
91 % The \tn{let} primitive is renamed by hand first as it is essential for
92 % the entire process to follow. This also uses \tn{global}, as that way
93 % we avoid leaving an unneeded csname in the hash table.
94 % \begin{macrocode}
95 \let \tex_global:D \global
96 \let \tex_let:D \let
97 % \end{macrocode}
98 %
99 % Everything is inside a (rather long) group, which keeps
100 % \cs{@@_primitive:NN} trapped.
101 % \begin{macrocode}
102 \begingroup
103 % \end{macrocode}
104 %
105 % \begin{macro}{\@@_primitive:NN}
106 % A temporary function to actually do the renaming.
107 % \begin{macrocode}
108 \long \def \@@_primitive:NN #1#2
109 { \tex_global:D \tex_let:D #2 #1 }
110 % \end{macrocode}
111 %\end{macro}
112 %
113 % To allow extracting \enquote{just the names}, a bit of DocStrip fiddling.
114 % \begin{macrocode}
115 %</code>
116 %<*names|code>
117 % \end{macrocode}
118 %
119 % In the current incarnation of this module, all \TeX{} primitives
120 % are given a new name of the form |\tex_|\emph{oldname}|:D|.
121 % But first three special cases which have symbolic original names.
122 % These are given modified new names, so that they may be entered
123 % without catcode tricks.
124 % \begin{macrocode}
125 \@@_primitive:NN \ \tex_space:D
126 \@@_primitive:NN \/ \tex_italiccorrection:D
127 \@@_primitive:NN \- \tex_hyphen:D
128 % \end{macrocode}
129 %
130 % Now all the other primitives.
131 % \begin{macrocode}
132 \@@_primitive:NN \above \tex_above:D
133 \@@_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D
134 \@@_primitive:NN \abovedisplayskip \tex_abovedisplayskip:D
135 \@@_primitive:NN \abovewithdelims \tex_abovewithdelims:D
136 \@@_primitive:NN \accent \tex_accent:D
137 \@@_primitive:NN \adjdemerits \tex_adjdemerits:D
138 \@@_primitive:NN \advance \tex_advance:D
139 \@@_primitive:NN \afterassignment \tex_afterassignment:D
140 \@@_primitive:NN \aftergroup \tex_aftergroup:D
141 \@@_primitive:NN \atop \tex_atop:D
142 \@@_primitive:NN \atopwithdelims \tex_atopwithdelims:D
143 \@@_primitive:NN \badness \tex_badness:D
144 \@@_primitive:NN \baselineskip \tex_baselineskip:D
145 \@@_primitive:NN \batchmode \tex_batchmode:D
146 \@@_primitive:NN \begingroup \tex_begingroup:D
147 \@@_primitive:NN \belowdisplayshortskip \tex_belowdisplayshortskip:D
148 \@@_primitive:NN \belowdisplayskip \tex_belowdisplayskip:D
149 \@@_primitive:NN \binoppenalty \tex_binoppenalty:D
150 \@@_primitive:NN \botmark \tex_botmark:D
151 \@@_primitive:NN \box \tex_box:D
152 \@@_primitive:NN \boxmaxdepth \tex_boxmaxdepth:D
153 \@@_primitive:NN \brokenpenalty \tex_brokenpenalty:D
154 \@@_primitive:NN \catcode \tex_catcode:D
155 \@@_primitive:NN \char \tex_char:D
156 \@@_primitive:NN \chardef \tex_chardef:D
157 \@@_primitive:NN \cleaders \tex_cleaders:D
158 \@@_primitive:NN \closein \tex_closein:D
159 \@@_primitive:NN \closeout \tex_closeout:D
160 \@@_primitive:NN \clubpenalty \tex_clubpenalty:D
161 \@@_primitive:NN \copy \tex_copy:D
162 \@@_primitive:NN \count \tex_count:D
163 \@@_primitive:NN \countdef \tex_countdef:D
164 \@@_primitive:NN \cr \tex_cr:D
165 \@@_primitive:NN \crcr \tex_crcr:D
166 \@@_primitive:NN \csname \tex_csname:D
167 \@@_primitive:NN \day \tex_day:D
168 \@@_primitive:NN \deadcycles \tex_deadcycles:D
169 \@@_primitive:NN \def \tex_def:D
170 \@@_primitive:NN \defaulthyphenchar \tex_defaulthyphenchar:D
171 \@@_primitive:NN \defaultskewchar \tex_defaultskewchar:D
172 \@@_primitive:NN \delcode \tex_delcode:D
173 \@@_primitive:NN \delimiter \tex_delimiter:D
174 \@@_primitive:NN \delimiterfactor \tex_delimiterfactor:D
175 \@@_primitive:NN \delimitershortfall \tex_delimitershortfall:D
176 \@@_primitive:NN \dimen \tex_dimen:D
177 \@@_primitive:NN \dimendef \tex_dimendef:D
178 \@@_primitive:NN \discretionary \tex_discretionary:D
179 \@@_primitive:NN \displayindent \tex_displayindent:D
180 \@@_primitive:NN \displaylimits \tex_displaylimits:D
181 \@@_primitive:NN \displaystyle \tex_displaystyle:D
182 \@@_primitive:NN \displaywidowpenalty \tex_displaywidowpenalty:D
183 \@@_primitive:NN \displaywidth \tex_displaywidth:D
184 \@@_primitive:NN \divide \tex_divide:D
185 \@@_primitive:NN \doublehyphendemerits \tex_doublehyphendemerits:D
186 \@@_primitive:NN \dp \tex_dp:D
187 \@@_primitive:NN \dump \tex_dump:D
188 \@@_primitive:NN \edef \tex_edef:D
189 \@@_primitive:NN \else \tex_else:D
190 \@@_primitive:NN \emergencystretch \tex_emergencystretch:D
191 \@@_primitive:NN \end \tex_end:D
192 \@@_primitive:NN \endcsname \tex_endcsname:D
193 \@@_primitive:NN \endgroup \tex_endgroup:D
194 \@@_primitive:NN \endinput \tex_endinput:D
195 \@@_primitive:NN \endlinechar \tex_endlinechar:D
196 \@@_primitive:NN \eqno \tex_eqno:D
197 \@@_primitive:NN \errhelp \tex_errhelp:D
198 \@@_primitive:NN \errmessage \tex_errmessage:D
199 \@@_primitive:NN \errorcontextlines \tex_errorcontextlines:D
200 \@@_primitive:NN \errorstopmode \tex_errorstopmode:D
201 \@@_primitive:NN \escapechar \tex_escapechar:D
202 \@@_primitive:NN \everycr \tex_everycr:D
203 \@@_primitive:NN \everydisplay \tex_everydisplay:D
204 \@@_primitive:NN \everyhbox \tex_everyhbox:D
205 \@@_primitive:NN \everyjob \tex_everyjob:D
206 \@@_primitive:NN \everymath \tex_everymath:D
207 \@@_primitive:NN \everypar \tex_everypar:D
208 \@@_primitive:NN \everyvbox \tex_everyvbox:D
209 \@@_primitive:NN \exhyphenpenalty \tex_exhyphenpenalty:D
210 \@@_primitive:NN \expandafter \tex_expandafter:D
211 \@@_primitive:NN \fam \tex_fam:D
212 \@@_primitive:NN \fi \tex_fi:D
213 \@@_primitive:NN \finalhyphendemerits \tex_finalhyphendemerits:D
214 \@@_primitive:NN \firstmark \tex_firstmark:D
215 \@@_primitive:NN \floatingpenalty \tex_floatingpenalty:D
216 \@@_primitive:NN \font \tex_font:D
217 \@@_primitive:NN \fontdimen \tex_fontdimen:D
218 \@@_primitive:NN \fontname \tex_fontname:D
219 \@@_primitive:NN \futurelet \tex_futurelet:D
220 \@@_primitive:NN \gdef \tex_gdef:D
221 \@@_primitive:NN \global \tex_global:D
222 \@@_primitive:NN \globaldefs \tex_globaldefs:D
223 \@@_primitive:NN \halign \tex_halign:D
224 \@@_primitive:NN \hangafter \tex_hangafter:D
225 \@@_primitive:NN \hangindent \tex_hangindent:D
226 \@@_primitive:NN \hbadness \tex_hbadness:D
227 \@@_primitive:NN \hbox \tex_hbox:D
228 \@@_primitive:NN \hfil \tex_hfil:D
229 \@@_primitive:NN \hfill \tex_hfill:D
230 \@@_primitive:NN \hfilneg \tex_hfilneg:D
231 \@@_primitive:NN \hfuzz \tex_hfuzz:D
232 \@@_primitive:NN \hoffset \tex_hoffset:D
233 \@@_primitive:NN \holdinginserts \tex_holdinginserts:D
234 \@@_primitive:NN \hrule \tex_hrule:D
235 \@@_primitive:NN \hsize \tex_hsize:D
236 \@@_primitive:NN \hskip \tex_hskip:D
237 \@@_primitive:NN \hss \tex_hss:D
238 \@@_primitive:NN \ht \tex_ht:D
239 \@@_primitive:NN \hyphenation \tex_hyphenation:D
240 \@@_primitive:NN \hyphenchar \tex_hyphenchar:D
241 \@@_primitive:NN \hyphenpenalty \tex_hyphenpenalty:D
242 \@@_primitive:NN \if \tex_if:D
243 \@@_primitive:NN \ifcase \tex_ifcase:D
244 \@@_primitive:NN \ifcat \tex_ifcat:D
245 \@@_primitive:NN \ifdim \tex_ifdim:D
246 \@@_primitive:NN \ifeof \tex_ifeof:D
247 \@@_primitive:NN \iffalse \tex_iffalse:D
248 \@@_primitive:NN \ifhbox \tex_ifhbox:D
249 \@@_primitive:NN \ifhmode \tex_ifhmode:D
250 \@@_primitive:NN \ifinner \tex_ifinner:D
251 \@@_primitive:NN \ifmmode \tex_ifmmode:D
252 \@@_primitive:NN \ifnum \tex_ifnum:D
253 \@@_primitive:NN \ifodd \tex_ifodd:D
254 \@@_primitive:NN \iftrue \tex_iftrue:D
255 \@@_primitive:NN \ifvbox \tex_ifvbox:D
256 \@@_primitive:NN \ifvmode \tex_ifvmode:D
257 \@@_primitive:NN \ifvoid \tex_ifvoid:D
258 \@@_primitive:NN \ifx \tex_ifx:D
259 \@@_primitive:NN \ignorespaces \tex_ignorespaces:D
260 \@@_primitive:NN \immediate \tex_immediate:D
261 \@@_primitive:NN \indent \tex_indent:D
262 \@@_primitive:NN \input \tex_input:D
263 \@@_primitive:NN \inputlineno \tex_inputlineno:D
264 \@@_primitive:NN \insert \tex_insert:D
265 \@@_primitive:NN \insertpenalties \tex_insertpenalties:D
266 \@@_primitive:NN \interlinepenalty \tex_interlinepenalty:D
267 \@@_primitive:NN \jobname \tex_jobname:D
268 \@@_primitive:NN \kern \tex_kern:D
269 \@@_primitive:NN \language \tex_language:D
270 \@@_primitive:NN \lastbox \tex_lastbox:D
271 \@@_primitive:NN \lastkern \tex_lastkern:D
272 \@@_primitive:NN \lastpenalty \tex_lastpenalty:D
273 \@@_primitive:NN \lastskip \tex_lastskip:D
274 \@@_primitive:NN \lccode \tex_lccode:D
275 \@@_primitive:NN \leaders \tex_leaders:D
276 \@@_primitive:NN \left \tex_left:D
277 \@@_primitive:NN \lefthyphenmin \tex_lefthyphenmin:D
278 \@@_primitive:NN \leftskip \tex_leftskip:D
279 \@@_primitive:NN \leqno \tex_leqno:D
280 \@@_primitive:NN \let \tex_let:D
281 \@@_primitive:NN \limits \tex_limits:D
282 \@@_primitive:NN \linepenalty \tex_linepenalty:D
283 \@@_primitive:NN \lineskip \tex_lineskip:D
284 \@@_primitive:NN \lineskiplimit \tex_lineskiplimit:D
285 \@@_primitive:NN \long \tex_long:D
286 \@@_primitive:NN \looseness \tex_looseness:D
287 \@@_primitive:NN \lower \tex_lower:D
288 \@@_primitive:NN \lowercase \tex_lowercase:D
289 \@@_primitive:NN \mag \tex_mag:D
290 \@@_primitive:NN \mark \tex_mark:D
291 \@@_primitive:NN \mathaccent \tex_mathaccent:D
292 \@@_primitive:NN \mathbin \tex_mathbin:D
293 \@@_primitive:NN \mathchar \tex_mathchar:D
294 \@@_primitive:NN \mathchardef \tex_mathchardef:D
295 \@@_primitive:NN \mathchoice \tex_mathchoice:D
296 \@@_primitive:NN \mathclose \tex_mathclose:D
297 \@@_primitive:NN \mathcode \tex_mathcode:D
298 \@@_primitive:NN \mathinner \tex_mathinner:D
299 \@@_primitive:NN \mathop \tex_mathop:D
300 \@@_primitive:NN \mathopen \tex_mathopen:D
301 \@@_primitive:NN \mathord \tex_mathord:D
302 \@@_primitive:NN \mathpunct \tex_mathpunct:D
303 \@@_primitive:NN \mathrel \tex_mathrel:D
304 \@@_primitive:NN \mathsurround \tex_mathsurround:D
305 \@@_primitive:NN \maxdeadcycles \tex_maxdeadcycles:D
306 \@@_primitive:NN \maxdepth \tex_maxdepth:D
307 \@@_primitive:NN \meaning \tex_meaning:D
308 \@@_primitive:NN \medmuskip \tex_medmuskip:D
309 \@@_primitive:NN \message \tex_message:D
310 \@@_primitive:NN \mkern \tex_mkern:D
311 \@@_primitive:NN \month \tex_month:D
312 \@@_primitive:NN \moveleft \tex_moveleft:D
313 \@@_primitive:NN \moveright \tex_moveright:D
314 \@@_primitive:NN \mskip \tex_mskip:D
315 \@@_primitive:NN \multiply \tex_multiply:D
316 \@@_primitive:NN \muskip \tex_muskip:D
317 \@@_primitive:NN \muskipdef \tex_muskipdef:D
318 \@@_primitive:NN \newlinechar \tex_newlinechar:D
319 \@@_primitive:NN \noalign \tex_noalign:D
320 \@@_primitive:NN \noboundary \tex_noboundary:D
321 \@@_primitive:NN \noexpand \tex_noexpand:D
322 \@@_primitive:NN \noindent \tex_noindent:D
323 \@@_primitive:NN \nolimits \tex_nolimits:D
324 \@@_primitive:NN \nonscript \tex_nonscript:D
325 \@@_primitive:NN \nonstopmode \tex_nonstopmode:D
326 \@@_primitive:NN \nulldelimiterspace \tex_nulldelimiterspace:D
327 \@@_primitive:NN \nullfont \tex_nullfont:D
328 \@@_primitive:NN \number \tex_number:D
329 \@@_primitive:NN \omit \tex_omit:D
330 \@@_primitive:NN \openin \tex_openin:D
331 \@@_primitive:NN \openout \tex_openout:D
332 \@@_primitive:NN \or \tex_or:D
333 \@@_primitive:NN \outer \tex_outer:D
334 \@@_primitive:NN \output \tex_output:D
335 \@@_primitive:NN \outputpenalty \tex_outputpenalty:D
336 \@@_primitive:NN \over \tex_over:D
337 \@@_primitive:NN \overfullrule \tex_overfullrule:D
338 \@@_primitive:NN \overline \tex_overline:D
339 \@@_primitive:NN \overwithdelims \tex_overwithdelims:D
340 \@@_primitive:NN \pagedepth \tex_pagedepth:D
341 \@@_primitive:NN \pagefilllstretch \tex_pagefilllstretch:D
342 \@@_primitive:NN \pagefillstretch \tex_pagefillstretch:D
343 \@@_primitive:NN \pagefilstretch \tex_pagefilstretch:D
344 \@@_primitive:NN \pagegoal \tex_pagegoal:D
345 \@@_primitive:NN \pageshrink \tex_pageshrink:D
346 \@@_primitive:NN \pagestretch \tex_pagestretch:D
347 \@@_primitive:NN \pagetotal \tex_pagetotal:D
348 \@@_primitive:NN \par \tex_par:D
349 \@@_primitive:NN \parfillskip \tex_parfillskip:D
350 \@@_primitive:NN \parindent \tex_parindent:D
351 \@@_primitive:NN \parshape \tex_parshape:D
352 \@@_primitive:NN \parskip \tex_parskip:D
353 \@@_primitive:NN \patterns \tex_patterns:D
354 \@@_primitive:NN \pausing \tex_pausing:D
355 \@@_primitive:NN \penalty \tex_penalty:D
356 \@@_primitive:NN \postdisplaypenalty \tex_postdisplaypenalty:D
357 \@@_primitive:NN \predisplaypenalty \tex_predisplaypenalty:D
358 \@@_primitive:NN \predisplaysize \tex_predisplaysize:D
359 \@@_primitive:NN \pretolerance \tex_pretolerance:D
360 \@@_primitive:NN \prevdepth \tex_prevdepth:D
361 \@@_primitive:NN \prevgraf \tex_prevgraf:D
362 \@@_primitive:NN \radical \tex_radical:D
363 \@@_primitive:NN \raise \tex_raise:D
364 \@@_primitive:NN \read \tex_read:D
365 \@@_primitive:NN \relax \tex_relax:D
366 \@@_primitive:NN \relpenalty \tex_relpenalty:D
367 \@@_primitive:NN \right \tex_right:D
368 \@@_primitive:NN \righthyphenmin \tex_righthyphenmin:D
369 \@@_primitive:NN \rightskip \tex_rightskip:D
370 \@@_primitive:NN \romannumeral \tex_romannumeral:D
371 \@@_primitive:NN \scriptfont \tex_scriptfont:D
372 \@@_primitive:NN \scriptscriptfont \tex_scriptscriptfont:D
373 \@@_primitive:NN \scriptscriptstyle \tex_scriptscriptstyle:D
374 \@@_primitive:NN \scriptspace \tex_scriptspace:D
375 \@@_primitive:NN \scriptstyle \tex_scriptstyle:D
376 \@@_primitive:NN \scrollmode \tex_scrollmode:D
377 \@@_primitive:NN \setbox \tex_setbox:D
378 \@@_primitive:NN \setlanguage \tex_setlanguage:D
379 \@@_primitive:NN \sfcode \tex_sfcode:D
380 \@@_primitive:NN \shipout \tex_shipout:D
381 \@@_primitive:NN \show \tex_show:D
382 \@@_primitive:NN \showbox \tex_showbox:D
383 \@@_primitive:NN \showboxbreadth \tex_showboxbreadth:D
384 \@@_primitive:NN \showboxdepth \tex_showboxdepth:D
385 \@@_primitive:NN \showlists \tex_showlists:D
386 \@@_primitive:NN \showthe \tex_showthe:D
387 \@@_primitive:NN \skewchar \tex_skewchar:D
388 \@@_primitive:NN \skip \tex_skip:D
389 \@@_primitive:NN \skipdef \tex_skipdef:D
390 \@@_primitive:NN \spacefactor \tex_spacefactor:D
391 \@@_primitive:NN \spaceskip \tex_spaceskip:D
392 \@@_primitive:NN \span \tex_span:D
393 \@@_primitive:NN \special \tex_special:D
394 \@@_primitive:NN \splitbotmark \tex_splitbotmark:D
395 \@@_primitive:NN \splitfirstmark \tex_splitfirstmark:D
396 \@@_primitive:NN \splitmaxdepth \tex_splitmaxdepth:D
397 \@@_primitive:NN \splittopskip \tex_splittopskip:D
398 \@@_primitive:NN \string \tex_string:D
399 \@@_primitive:NN \tabskip \tex_tabskip:D
400 \@@_primitive:NN \textfont \tex_textfont:D
401 \@@_primitive:NN \textstyle \tex_textstyle:D
402 \@@_primitive:NN \the \tex_the:D
403 \@@_primitive:NN \thickmuskip \tex_thickmuskip:D
404 \@@_primitive:NN \thinmuskip \tex_thinmuskip:D
405 \@@_primitive:NN \time \tex_time:D
406 \@@_primitive:NN \toks \tex_toks:D
407 \@@_primitive:NN \toksdef \tex_toksdef:D
408 \@@_primitive:NN \tolerance \tex_tolerance:D
409 \@@_primitive:NN \topmark \tex_topmark:D
410 \@@_primitive:NN \topskip \tex_topskip:D
411 \@@_primitive:NN \tracingcommands \tex_tracingcommands:D
412 \@@_primitive:NN \tracinglostchars \tex_tracinglostchars:D
413 \@@_primitive:NN \tracingmacros \tex_tracingmacros:D
414 \@@_primitive:NN \tracingonline \tex_tracingonline:D
415 \@@_primitive:NN \tracingoutput \tex_tracingoutput:D
416 \@@_primitive:NN \tracingpages \tex_tracingpages:D
417 \@@_primitive:NN \tracingparagraphs \tex_tracingparagraphs:D
418 \@@_primitive:NN \tracingrestores \tex_tracingrestores:D
419 \@@_primitive:NN \tracingstats \tex_tracingstats:D
420 \@@_primitive:NN \uccode \tex_uccode:D
421 \@@_primitive:NN \uchyph \tex_uchyph:D
422 \@@_primitive:NN \underline \tex_underline:D
423 \@@_primitive:NN \unhbox \tex_unhbox:D
424 \@@_primitive:NN \unhcopy \tex_unhcopy:D
425 \@@_primitive:NN \unkern \tex_unkern:D
426 \@@_primitive:NN \unpenalty \tex_unpenalty:D
427 \@@_primitive:NN \unskip \tex_unskip:D
428 \@@_primitive:NN \unvbox \tex_unvbox:D
429 \@@_primitive:NN \unvcopy \tex_unvcopy:D
430 \@@_primitive:NN \uppercase \tex_uppercase:D
431 \@@_primitive:NN \vadjust \tex_vadjust:D
432 \@@_primitive:NN \valign \tex_valign:D
433 \@@_primitive:NN \vbadness \tex_vbadness:D
434 \@@_primitive:NN \vbox \tex_vbox:D
435 \@@_primitive:NN \vcenter \tex_vcenter:D
436 \@@_primitive:NN \vfil \tex_vfil:D
437 \@@_primitive:NN \vfill \tex_vfill:D
438 \@@_primitive:NN \vfilneg \tex_vfilneg:D
439 \@@_primitive:NN \vfuzz \tex_vfuzz:D
440 \@@_primitive:NN \voffset \tex_voffset:D
441 \@@_primitive:NN \vrule \tex_vrule:D
442 \@@_primitive:NN \vsize \tex_vsize:D
443 \@@_primitive:NN \vskip \tex_vskip:D
444 \@@_primitive:NN \vsplit \tex_vsplit:D
445 \@@_primitive:NN \vss \tex_vss:D
446 \@@_primitive:NN \vtop \tex_vtop:D
447 \@@_primitive:NN \wd \tex_wd:D
448 \@@_primitive:NN \widowpenalty \tex_widowpenalty:D
449 \@@_primitive:NN \write \tex_write:D
450 \@@_primitive:NN \xdef \tex_xdef:D
451 \@@_primitive:NN \xleaders \tex_xleaders:D
452 \@@_primitive:NN \xspaceskip \tex_xspaceskip:D
453 \@@_primitive:NN \year \tex_year:D
454 % \end{macrocode}
455 % Primitives introduced by \eTeX{}.
456 % \begin{macrocode}
457 \@@_primitive:NN \beginL \tex_beginL:D
458 \@@_primitive:NN \beginR \tex_beginR:D
459 \@@_primitive:NN \botmarks \tex_botmarks:D
460 \@@_primitive:NN \clubpenalties \tex_clubpenalties:D
461 \@@_primitive:NN \currentgrouplevel \tex_currentgrouplevel:D
462 \@@_primitive:NN \currentgrouptype \tex_currentgrouptype:D
463 \@@_primitive:NN \currentifbranch \tex_currentifbranch:D
464 \@@_primitive:NN \currentiflevel \tex_currentiflevel:D
465 \@@_primitive:NN \currentiftype \tex_currentiftype:D
466 \@@_primitive:NN \detokenize \tex_detokenize:D
467 \@@_primitive:NN \dimexpr \tex_dimexpr:D
468 \@@_primitive:NN \displaywidowpenalties \tex_displaywidowpenalties:D
469 \@@_primitive:NN \endL \tex_endL:D
470 \@@_primitive:NN \endR \tex_endR:D
471 \@@_primitive:NN \eTeXrevision \tex_eTeXrevision:D
472 \@@_primitive:NN \eTeXversion \tex_eTeXversion:D
473 \@@_primitive:NN \everyeof \tex_everyeof:D
474 \@@_primitive:NN \firstmarks \tex_firstmarks:D
475 \@@_primitive:NN \fontchardp \tex_fontchardp:D
476 \@@_primitive:NN \fontcharht \tex_fontcharht:D
477 \@@_primitive:NN \fontcharic \tex_fontcharic:D
478 \@@_primitive:NN \fontcharwd \tex_fontcharwd:D
479 \@@_primitive:NN \glueexpr \tex_glueexpr:D
480 \@@_primitive:NN \glueshrink \tex_glueshrink:D
481 \@@_primitive:NN \glueshrinkorder \tex_glueshrinkorder:D
482 \@@_primitive:NN \gluestretch \tex_gluestretch:D
483 \@@_primitive:NN \gluestretchorder \tex_gluestretchorder:D
484 \@@_primitive:NN \gluetomu \tex_gluetomu:D
485 \@@_primitive:NN \ifcsname \tex_ifcsname:D
486 \@@_primitive:NN \ifdefined \tex_ifdefined:D
487 \@@_primitive:NN \iffontchar \tex_iffontchar:D
488 \@@_primitive:NN \interactionmode \tex_interactionmode:D
489 \@@_primitive:NN \interlinepenalties \tex_interlinepenalties:D
490 \@@_primitive:NN \lastlinefit \tex_lastlinefit:D
491 \@@_primitive:NN \lastnodetype \tex_lastnodetype:D
492 \@@_primitive:NN \marks \tex_marks:D
493 \@@_primitive:NN \middle \tex_middle:D
494 \@@_primitive:NN \muexpr \tex_muexpr:D
495 \@@_primitive:NN \mutoglue \tex_mutoglue:D
496 \@@_primitive:NN \numexpr \tex_numexpr:D
497 \@@_primitive:NN \pagediscards \tex_pagediscards:D
498 \@@_primitive:NN \parshapedimen \tex_parshapedimen:D
499 \@@_primitive:NN \parshapeindent \tex_parshapeindent:D
500 \@@_primitive:NN \parshapelength \tex_parshapelength:D
501 \@@_primitive:NN \predisplaydirection \tex_predisplaydirection:D
502 \@@_primitive:NN \protected \tex_protected:D
503 \@@_primitive:NN \readline \tex_readline:D
504 \@@_primitive:NN \savinghyphcodes \tex_savinghyphcodes:D
505 \@@_primitive:NN \savingvdiscards \tex_savingvdiscards:D
506 \@@_primitive:NN \scantokens \tex_scantokens:D
507 \@@_primitive:NN \showgroups \tex_showgroups:D
508 \@@_primitive:NN \showifs \tex_showifs:D
509 \@@_primitive:NN \showtokens \tex_showtokens:D
510 \@@_primitive:NN \splitbotmarks \tex_splitbotmarks:D
511 \@@_primitive:NN \splitdiscards \tex_splitdiscards:D
512 \@@_primitive:NN \splitfirstmarks \tex_splitfirstmarks:D
513 \@@_primitive:NN \TeXXeTstate \tex_TeXXeTstate:D
514 \@@_primitive:NN \topmarks \tex_topmarks:D
515 \@@_primitive:NN \tracingassigns \tex_tracingassigns:D
516 \@@_primitive:NN \tracinggroups \tex_tracinggroups:D
517 \@@_primitive:NN \tracingifs \tex_tracingifs:D
518 \@@_primitive:NN \tracingnesting \tex_tracingnesting:D
519 \@@_primitive:NN \tracingscantokens \tex_tracingscantokens:D
520 \@@_primitive:NN \unexpanded \tex_unexpanded:D
521 \@@_primitive:NN \unless \tex_unless:D
522 \@@_primitive:NN \widowpenalties \tex_widowpenalties:D
523 % \end{macrocode}
524 % Post-\eTeX{} primitives do not always end up with the same name in all
525 % engines, if indeed they are available cross-engine anyway. We therefore
526 % take the approach of preferring the shortest name that makes sense. First,
527 % we deal with the primitives introduced by \pdfTeX{} which directly
528 % relate to PDF output: these are copied with the names unchanged.
529 % \begin{macrocode}
530 \@@_primitive:NN \pdfannot \tex_pdfannot:D
531 \@@_primitive:NN \pdfcatalog \tex_pdfcatalog:D
532 \@@_primitive:NN \pdfcompresslevel \tex_pdfcompresslevel:D
533 \@@_primitive:NN \pdfcolorstack \tex_pdfcolorstack:D
534 \@@_primitive:NN \pdfcolorstackinit \tex_pdfcolorstackinit:D
535 \@@_primitive:NN \pdfdecimaldigits \tex_pdfdecimaldigits:D
536 \@@_primitive:NN \pdfdest \tex_pdfdest:D
537 \@@_primitive:NN \pdfdestmargin \tex_pdfdestmargin:D
538 \@@_primitive:NN \pdfendlink \tex_pdfendlink:D
539 \@@_primitive:NN \pdfendthread \tex_pdfendthread:D
540 \@@_primitive:NN \pdffakespace \tex_pdffakespace:D
541 \@@_primitive:NN \pdffontattr \tex_pdffontattr:D
542 \@@_primitive:NN \pdffontname \tex_pdffontname:D
543 \@@_primitive:NN \pdffontobjnum \tex_pdffontobjnum:D
544 \@@_primitive:NN \pdfgamma \tex_pdfgamma:D
545 \@@_primitive:NN \pdfgentounicode \tex_pdfgentounicode:D
546 \@@_primitive:NN \pdfglyphtounicode \tex_pdfglyphtounicode:D
547 \@@_primitive:NN \pdfhorigin \tex_pdfhorigin:D
548 \@@_primitive:NN \pdfimageapplygamma \tex_pdfimageapplygamma:D
549 \@@_primitive:NN \pdfimagegamma \tex_pdfimagegamma:D
550 \@@_primitive:NN \pdfimagehicolor \tex_pdfimagehicolor:D
551 \@@_primitive:NN \pdfimageresolution \tex_pdfimageresolution:D
552 \@@_primitive:NN \pdfincludechars \tex_pdfincludechars:D
553 \@@_primitive:NN \pdfinclusioncopyfonts \tex_pdfinclusioncopyfonts:D
554 \@@_primitive:NN \pdfinclusionerrorlevel
555 \tex_pdfinclusionerrorlevel:D
556 \@@_primitive:NN \pdfinfo \tex_pdfinfo:D
557 \@@_primitive:NN \pdfinfoomitdate \tex_pdfinfoomitdate:D
558 \@@_primitive:NN \pdfinterwordspaceoff \tex_pdfinterwordspaceoff:D
559 \@@_primitive:NN \pdfinterwordspaceon \tex_pdfinterwordspaceon:D
560 \@@_primitive:NN \pdflastannot \tex_pdflastannot:D
561 \@@_primitive:NN \pdflastlink \tex_pdflastlink:D
562 \@@_primitive:NN \pdflastobj \tex_pdflastobj:D
563 \@@_primitive:NN \pdflastxform \tex_pdflastxform:D
564 \@@_primitive:NN \pdflastximage \tex_pdflastximage:D
565 \@@_primitive:NN \pdflastximagecolordepth
566 \tex_pdflastximagecolordepth:D
567 \@@_primitive:NN \pdflastximagepages \tex_pdflastximagepages:D
568 \@@_primitive:NN \pdflinkmargin \tex_pdflinkmargin:D
569 \@@_primitive:NN \pdfliteral \tex_pdfliteral:D
570 \@@_primitive:NN \pdfmapfile \tex_pdfmapfile:D
571 \@@_primitive:NN \pdfmapline \tex_pdfmapline:D
572 \@@_primitive:NN \pdfmajorversion \tex_pdfmajorversion:D
573 \@@_primitive:NN \pdfminorversion \tex_pdfminorversion:D
574 \@@_primitive:NN \pdfnames \tex_pdfnames:D
575 \@@_primitive:NN \pdfnobuiltintounicode \tex_pdfnobuiltintounicode:D
576 \@@_primitive:NN \pdfobj \tex_pdfobj:D
577 \@@_primitive:NN \pdfobjcompresslevel \tex_pdfobjcompresslevel:D
578 \@@_primitive:NN \pdfomitcharset \tex_pdfomitcharset:D
579 \@@_primitive:NN \pdfoutline \tex_pdfoutline:D
580 \@@_primitive:NN \pdfoutput \tex_pdfoutput:D
581 \@@_primitive:NN \pdfpageattr \tex_pdfpageattr:D
582 \@@_primitive:NN \pdfpagebox \tex_pdfpagebox:D
583 \@@_primitive:NN \pdfpageref \tex_pdfpageref:D
584 \@@_primitive:NN \pdfpageresources \tex_pdfpageresources:D
585 \@@_primitive:NN \pdfpagesattr \tex_pdfpagesattr:D
586 \@@_primitive:NN \pdfptexuseunderscore \tex_pdfptexuseunderscore:D
587 \@@_primitive:NN \pdfrefobj \tex_pdfrefobj:D
588 \@@_primitive:NN \pdfrefxform \tex_pdfrefxform:D
589 \@@_primitive:NN \pdfrefximage \tex_pdfrefximage:D
590 \@@_primitive:NN \pdfrestore \tex_pdfrestore:D
591 \@@_primitive:NN \pdfretval \tex_pdfretval:D
592 \@@_primitive:NN \pdfrunninglinkoff \tex_pdfrunninglinkoff:D
593 \@@_primitive:NN \pdfrunninglinkon \tex_pdfrunninglinkon:D
594 \@@_primitive:NN \pdfsave \tex_pdfsave:D
595 \@@_primitive:NN \pdfsetmatrix \tex_pdfsetmatrix:D
596 \@@_primitive:NN \pdfstartlink \tex_pdfstartlink:D
597 \@@_primitive:NN \pdfstartthread \tex_pdfstartthread:D
598 \@@_primitive:NN \pdfsuppressptexinfo \tex_pdfsuppressptexinfo:D
599 \@@_primitive:NN \pdfsuppresswarningdupdest
600 \tex_pdfsuppresswarningdupdest:D
601 \@@_primitive:NN \pdfsuppresswarningdupmap
602 \tex_pdfsuppresswarningdupmap:D
603 \@@_primitive:NN \pdfsuppresswarningpagegroup
604 \tex_pdfsuppresswarningpagegroup:D
605 \@@_primitive:NN \pdfthread \tex_pdfthread:D
606 \@@_primitive:NN \pdfthreadmargin \tex_pdfthreadmargin:D
607 \@@_primitive:NN \pdftrailer \tex_pdftrailer:D
608 \@@_primitive:NN \pdftrailerid \tex_pdftrailerid:D
609 \@@_primitive:NN \pdfuniqueresname \tex_pdfuniqueresname:D
610 \@@_primitive:NN \pdfvorigin \tex_pdfvorigin:D
611 \@@_primitive:NN \pdfxform \tex_pdfxform:D
612 \@@_primitive:NN \pdfxformname \tex_pdfxformname:D
613 \@@_primitive:NN \pdfximage \tex_pdfximage:D
614 \@@_primitive:NN \pdfximagebbox \tex_pdfximagebbox:D
615 % \end{macrocode}
616 % These are not related to PDF output and either already appear in other
617 % engines without the |\pdf| prefix, or might reasonably do so at some
618 % future stage. We therefore drop the leading |pdf| here.
619 % \begin{macrocode}
620 \@@_primitive:NN \ifpdfabsdim \tex_ifabsdim:D
621 \@@_primitive:NN \ifpdfabsnum \tex_ifabsnum:D
622 \@@_primitive:NN \ifpdfprimitive \tex_ifprimitive:D
623 \@@_primitive:NN \pdfadjustinterwordglue
624 \tex_adjustinterwordglue:D
625 \@@_primitive:NN \pdfadjustspacing \tex_adjustspacing:D
626 \@@_primitive:NN \pdfappendkern \tex_appendkern:D
627 \@@_primitive:NN \pdfcopyfont \tex_copyfont:D
628 \@@_primitive:NN \pdfcreationdate \tex_creationdate:D
629 \@@_primitive:NN \pdfdraftmode \tex_draftmode:D
630 \@@_primitive:NN \pdfeachlinedepth \tex_eachlinedepth:D
631 \@@_primitive:NN \pdfeachlineheight \tex_eachlineheight:D
632 \@@_primitive:NN \pdfelapsedtime \tex_elapsedtime:D
633 \@@_primitive:NN \pdfescapehex \tex_escapehex:D
634 \@@_primitive:NN \pdfescapename \tex_escapename:D
635 \@@_primitive:NN \pdfescapestring \tex_escapestring:D
636 \@@_primitive:NN \pdffirstlineheight \tex_firstlineheight:D
637 \@@_primitive:NN \pdffontexpand \tex_fontexpand:D
638 \@@_primitive:NN \pdffontsize \tex_fontsize:D
639 \@@_primitive:NN \pdfignoreddimen \tex_ignoreddimen:D
640 \@@_primitive:NN \pdfinsertht \tex_insertht:D
641 \@@_primitive:NN \pdflastlinedepth \tex_lastlinedepth:D
642 \@@_primitive:NN \pdflastmatch \tex_lastmatch:D
643 \@@_primitive:NN \pdflastxpos \tex_lastxpos:D
644 \@@_primitive:NN \pdflastypos \tex_lastypos:D
645 \@@_primitive:NN \pdfmatch \tex_match:D
646 \@@_primitive:NN \pdfnoligatures \tex_noligatures:D
647 \@@_primitive:NN \pdfnormaldeviate \tex_normaldeviate:D
648 \@@_primitive:NN \pdfpageheight \tex_pageheight:D
649 \@@_primitive:NN \pdfpagewidth \tex_pagewidth:D
650 \@@_primitive:NN \pdfpkmode \tex_pkmode:D
651 \@@_primitive:NN \pdfpkresolution \tex_pkresolution:D
652 \@@_primitive:NN \pdfprimitive \tex_primitive:D
653 \@@_primitive:NN \pdfprependkern \tex_prependkern:D
654 \@@_primitive:NN \pdfprotrudechars \tex_protrudechars:D
655 \@@_primitive:NN \pdfpxdimen \tex_pxdimen:D
656 \@@_primitive:NN \pdfrandomseed \tex_randomseed:D
657 \@@_primitive:NN \pdfresettimer \tex_resettimer:D
658 \@@_primitive:NN \pdfsavepos \tex_savepos:D
659 \@@_primitive:NN \pdfsetrandomseed \tex_setrandomseed:D
660 \@@_primitive:NN \pdfshellescape \tex_shellescape:D
661 \@@_primitive:NN \pdftracingfonts \tex_tracingfonts:D
662 \@@_primitive:NN \pdfunescapehex \tex_unescapehex:D
663 \@@_primitive:NN \pdfuniformdeviate \tex_uniformdeviate:D
664 % \end{macrocode}
665 % The version primitives are not related to PDF mode but are
666 % \pdfTeX{}-specific, so again are carried forward unchanged.
667 % \begin{macrocode}
668 \@@_primitive:NN \pdftexbanner \tex_pdftexbanner:D
669 \@@_primitive:NN \pdftexrevision \tex_pdftexrevision:D
670 \@@_primitive:NN \pdftexversion \tex_pdftexversion:D
671 % \end{macrocode}
672 % These ones appear in \pdfTeX{} but don't have |pdf| in the name at all:
673 % no decisions to make.
674 % \begin{macrocode}
675 \@@_primitive:NN \efcode \tex_efcode:D
676 \@@_primitive:NN \ifincsname \tex_ifincsname:D
677 \@@_primitive:NN \knaccode \tex_knaccode:D
678 \@@_primitive:NN \knbccode \tex_knbccode:D
679 \@@_primitive:NN \knbscode \tex_knbscode:D
680 \@@_primitive:NN \leftmarginkern \tex_leftmarginkern:D
681 \@@_primitive:NN \letterspacefont \tex_letterspacefont:D
682 \@@_primitive:NN \lpcode \tex_lpcode:D
683 \@@_primitive:NN \quitvmode \tex_quitvmode:D
684 \@@_primitive:NN \rightmarginkern \tex_rightmarginkern:D
685 \@@_primitive:NN \rpcode \tex_rpcode:D
686 \@@_primitive:NN \shbscode \tex_shbscode:D
687 \@@_primitive:NN \stbscode \tex_stbscode:D
688 \@@_primitive:NN \synctex \tex_synctex:D
689 \@@_primitive:NN \tagcode \tex_tagcode:D
690 % \end{macrocode}
691 % Post \pdfTeX{} primitive availability gets more complex. Both \XeTeX{} and
692 % \LuaTeX{} have varying names for some primitives from \pdfTeX{}. Particularly
693 % for \LuaTeX{} tracking all of that would be hard. Instead, we now check that
694 % we only save primitives if they actually exist.
695 % \begin{macrocode}
696 %</names|code>
697 %<*code>
698 \tex_long:D \tex_def:D \use_ii:nn #1#2 {#2}
699 \tex_long:D \tex_def:D \use_none:n #1 { }
700 \tex_long:D \tex_def:D \@@_primitive:NN #1#2
701 {
702 \tex_ifdefined:D #1
703 \tex_expandafter:D \use_ii:nn
704 \tex_fi:D
705 \use_none:n { \tex_global:D \tex_let:D #2 #1 }
706 }
707 %</code>
708 %<*names|code>
709 % \end{macrocode}
710 % Some \pdfTeX{} primitives are handled here because they got dropped in
711 % \LuaTeX{} but the corresponding internal names are emulated later. The
712 % Lua code is already loaded at this point, so we shouldn't overwrite them.
713 % \begin{macrocode}
714 \@@_primitive:NN \pdfstrcmp \tex_strcmp:D
715 \@@_primitive:NN \pdffilesize \tex_filesize:D
716 \@@_primitive:NN \pdfmdfivesum \tex_mdfivesum:D
717 \@@_primitive:NN \pdffilemoddate \tex_filemoddate:D
718 \@@_primitive:NN \pdffiledump \tex_filedump:D
719 % \end{macrocode}
720 % \XeTeX{}-specific primitives. Note that \XeTeX{}'s \tn{strcmp} is
721 % handled earlier and is \enquote{rolled up} into \tn{pdfstrcmp}.
722 % A few cross-compatibility names which lack
723 % the |pdf| of the original are handled later.
724 % \begin{macrocode}
725 \@@_primitive:NN \suppressfontnotfounderror
726 \tex_suppressfontnotfounderror:D
727 \@@_primitive:NN \XeTeXcharclass \tex_XeTeXcharclass:D
728 \@@_primitive:NN \XeTeXcharglyph \tex_XeTeXcharglyph:D
729 \@@_primitive:NN \XeTeXcountfeatures \tex_XeTeXcountfeatures:D
730 \@@_primitive:NN \XeTeXcountglyphs \tex_XeTeXcountglyphs:D
731 \@@_primitive:NN \XeTeXcountselectors \tex_XeTeXcountselectors:D
732 \@@_primitive:NN \XeTeXcountvariations \tex_XeTeXcountvariations:D
733 \@@_primitive:NN \XeTeXdefaultencoding \tex_XeTeXdefaultencoding:D
734 \@@_primitive:NN \XeTeXdashbreakstate \tex_XeTeXdashbreakstate:D
735 \@@_primitive:NN \XeTeXfeaturecode \tex_XeTeXfeaturecode:D
736 \@@_primitive:NN \XeTeXfeaturename \tex_XeTeXfeaturename:D
737 \@@_primitive:NN \XeTeXfindfeaturebyname
738 \tex_XeTeXfindfeaturebyname:D
739 \@@_primitive:NN \XeTeXfindselectorbyname
740 \tex_XeTeXfindselectorbyname:D
741 \@@_primitive:NN \XeTeXfindvariationbyname
742 \tex_XeTeXfindvariationbyname:D
743 \@@_primitive:NN \XeTeXfirstfontchar \tex_XeTeXfirstfontchar:D
744 \@@_primitive:NN \XeTeXfonttype \tex_XeTeXfonttype:D
745 \@@_primitive:NN \XeTeXgenerateactualtext
746 \tex_XeTeXgenerateactualtext:D
747 \@@_primitive:NN \XeTeXglyph \tex_XeTeXglyph:D
748 \@@_primitive:NN \XeTeXglyphbounds \tex_XeTeXglyphbounds:D
749 \@@_primitive:NN \XeTeXglyphindex \tex_XeTeXglyphindex:D
750 \@@_primitive:NN \XeTeXglyphname \tex_XeTeXglyphname:D
751 \@@_primitive:NN \XeTeXinputencoding \tex_XeTeXinputencoding:D
752 \@@_primitive:NN \XeTeXinputnormalization
753 \tex_XeTeXinputnormalization:D
754 \@@_primitive:NN \XeTeXinterchartokenstate
755 \tex_XeTeXinterchartokenstate:D
756 \@@_primitive:NN \XeTeXinterchartoks \tex_XeTeXinterchartoks:D
757 \@@_primitive:NN \XeTeXisdefaultselector
758 \tex_XeTeXisdefaultselector:D
759 \@@_primitive:NN \XeTeXisexclusivefeature
760 \tex_XeTeXisexclusivefeature:D
761 \@@_primitive:NN \XeTeXlastfontchar \tex_XeTeXlastfontchar:D
762 \@@_primitive:NN \XeTeXlinebreakskip \tex_XeTeXlinebreakskip:D
763 \@@_primitive:NN \XeTeXlinebreaklocale \tex_XeTeXlinebreaklocale:D
764 \@@_primitive:NN \XeTeXlinebreakpenalty \tex_XeTeXlinebreakpenalty:D
765 \@@_primitive:NN \XeTeXOTcountfeatures \tex_XeTeXOTcountfeatures:D
766 \@@_primitive:NN \XeTeXOTcountlanguages \tex_XeTeXOTcountlanguages:D
767 \@@_primitive:NN \XeTeXOTcountscripts \tex_XeTeXOTcountscripts:D
768 \@@_primitive:NN \XeTeXOTfeaturetag \tex_XeTeXOTfeaturetag:D
769 \@@_primitive:NN \XeTeXOTlanguagetag \tex_XeTeXOTlanguagetag:D
770 \@@_primitive:NN \XeTeXOTscripttag \tex_XeTeXOTscripttag:D
771 \@@_primitive:NN \XeTeXpdffile \tex_XeTeXpdffile:D
772 \@@_primitive:NN \XeTeXpdfpagecount \tex_XeTeXpdfpagecount:D
773 \@@_primitive:NN \XeTeXpicfile \tex_XeTeXpicfile:D
774 \@@_primitive:NN \XeTeXrevision \tex_XeTeXrevision:D
775 \@@_primitive:NN \XeTeXselectorname \tex_XeTeXselectorname:D
776 \@@_primitive:NN \XeTeXtracingfonts \tex_XeTeXtracingfonts:D
777 \@@_primitive:NN \XeTeXupwardsmode \tex_XeTeXupwardsmode:D
778 \@@_primitive:NN \XeTeXuseglyphmetrics \tex_XeTeXuseglyphmetrics:D
779 \@@_primitive:NN \XeTeXvariation \tex_XeTeXvariation:D
780 \@@_primitive:NN \XeTeXvariationdefault \tex_XeTeXvariationdefault:D
781 \@@_primitive:NN \XeTeXvariationmax \tex_XeTeXvariationmax:D
782 \@@_primitive:NN \XeTeXvariationmin \tex_XeTeXvariationmin:D
783 \@@_primitive:NN \XeTeXvariationname \tex_XeTeXvariationname:D
784 \@@_primitive:NN \XeTeXversion \tex_XeTeXversion:D
785 \@@_primitive:NN \XeTeXselectorcode \tex_XeTeXselectorcode:D
786 \@@_primitive:NN \XeTeXinterwordspaceshaping
787 \tex_XeTeXinterwordspaceshaping:D
788 \@@_primitive:NN \XeTeXhyphenatablelength
789 \tex_XeTeXhyphenatablelength:D
790 % \end{macrocode}
791 % Primitives from \pdfTeX{} that \XeTeX{} renames: also helps with
792 % \LuaTeX{}.
793 % \begin{macrocode}
794 \@@_primitive:NN \creationdate \tex_creationdate:D
795 \@@_primitive:NN \elapsedtime \tex_elapsedtime:D
796 \@@_primitive:NN \filedump \tex_filedump:D
797 \@@_primitive:NN \filemoddate \tex_filemoddate:D
798 \@@_primitive:NN \filesize \tex_filesize:D
799 \@@_primitive:NN \mdfivesum \tex_mdfivesum:D
800 \@@_primitive:NN \ifprimitive \tex_ifprimitive:D
801 \@@_primitive:NN \primitive \tex_primitive:D
802 \@@_primitive:NN \resettimer \tex_resettimer:D
803 \@@_primitive:NN \shellescape \tex_shellescape:D
804 \@@_primitive:NN \XeTeXprotrudechars \tex_protrudechars:D
805 % \end{macrocode}
806 % Primitives from \LuaTeX{}, some of which have been ported back to
807 % \XeTeX{}.
808 % \begin{macrocode}
809 \@@_primitive:NN \alignmark \tex_alignmark:D
810 \@@_primitive:NN \aligntab \tex_aligntab:D
811 \@@_primitive:NN \attribute \tex_attribute:D
812 \@@_primitive:NN \attributedef \tex_attributedef:D
813 \@@_primitive:NN \automaticdiscretionary
814 \tex_automaticdiscretionary:D
815 \@@_primitive:NN \automatichyphenmode \tex_automatichyphenmode:D
816 \@@_primitive:NN \automatichyphenpenalty
817 \tex_automatichyphenpenalty:D
818 \@@_primitive:NN \begincsname \tex_begincsname:D
819 \@@_primitive:NN \bodydir \tex_bodydir:D
820 \@@_primitive:NN \bodydirection \tex_bodydirection:D
821 \@@_primitive:NN \boundary \tex_boundary:D
822 \@@_primitive:NN \boxdir \tex_boxdir:D
823 \@@_primitive:NN \boxdirection \tex_boxdirection:D
824 \@@_primitive:NN \breakafterdirmode \tex_breakafterdirmode:D
825 \@@_primitive:NN \catcodetable \tex_catcodetable:D
826 \@@_primitive:NN \clearmarks \tex_clearmarks:D
827 % \@@_primitive:NN \compoundhyphenmode
828 % \tex_compoundhyphenmode:D % not documented in manual
829 \@@_primitive:NN \crampeddisplaystyle \tex_crampeddisplaystyle:D
830 \@@_primitive:NN \crampedscriptscriptstyle
831 \tex_crampedscriptscriptstyle:D
832 \@@_primitive:NN \crampedscriptstyle \tex_crampedscriptstyle:D
833 \@@_primitive:NN \crampedtextstyle \tex_crampedtextstyle:D
834 \@@_primitive:NN \csstring \tex_csstring:D
835 \@@_primitive:NN \deferred \tex_deferred:D
836 \@@_primitive:NN \discretionaryligaturemode
837 \tex_discretionaryligaturemode:D
838 \@@_primitive:NN \directlua \tex_directlua:D
839 \@@_primitive:NN \dviextension \tex_dviextension:D
840 \@@_primitive:NN \dvifeedback \tex_dvifeedback:D
841 \@@_primitive:NN \dvivariable \tex_dvivariable:D
842 \@@_primitive:NN \eTeXglueshrinkorder \tex_eTeXglueshrinkorder:D
843 \@@_primitive:NN \eTeXgluestretchorder \tex_eTeXgluestretchorder:D
844 \@@_primitive:NN \endlocalcontrol \tex_endlocalcontrol:D
845 \@@_primitive:NN \etoksapp \tex_etoksapp:D
846 \@@_primitive:NN \etokspre \tex_etokspre:D
847 \@@_primitive:NN \exceptionpenalty \tex_exceptionpenalty:D
848 \@@_primitive:NN \exhyphenchar \tex_exhyphenchar:D
849 \@@_primitive:NN \explicithyphenpenalty \tex_explicithyphenpenalty:D
850 \@@_primitive:NN \expanded \tex_expanded:D
851 \@@_primitive:NN \explicitdiscretionary \tex_explicitdiscretionary:D
852 \@@_primitive:NN \firstvalidlanguage \tex_firstvalidlanguage:D
853 % \@@_primitive:NN \fixupboxesmode
854 % \tex_fixupboxesmode:D % not documented in manual
855 \@@_primitive:NN \fontid \tex_fontid:D
856 \@@_primitive:NN \formatname \tex_formatname:D
857 \@@_primitive:NN \hjcode \tex_hjcode:D
858 \@@_primitive:NN \hpack \tex_hpack:D
859 \@@_primitive:NN \hyphenationbounds \tex_hyphenationbounds:D
860 \@@_primitive:NN \hyphenationmin \tex_hyphenationmin:D
861 \@@_primitive:NN \hyphenpenaltymode \tex_hyphenpenaltymode:D
862 \@@_primitive:NN \gleaders \tex_gleaders:D
863 \@@_primitive:NN \glet \tex_glet:D
864 \@@_primitive:NN \glyphdimensionsmode \tex_glyphdimensionsmode:D
865 \@@_primitive:NN \gtoksapp \tex_gtoksapp:D
866 \@@_primitive:NN \gtokspre \tex_gtokspre:D
867 \@@_primitive:NN \ifcondition \tex_ifcondition:D
868 \@@_primitive:NN \immediateassigned \tex_immediateassigned:D
869 \@@_primitive:NN \immediateassignment \tex_immediateassignment:D
870 \@@_primitive:NN \initcatcodetable \tex_initcatcodetable:D
871 \@@_primitive:NN \lastnamedcs \tex_lastnamedcs:D
872 \@@_primitive:NN \latelua \tex_latelua:D
873 \@@_primitive:NN \lateluafunction \tex_lateluafunction:D
874 \@@_primitive:NN \leftghost \tex_leftghost:D
875 \@@_primitive:NN \letcharcode \tex_letcharcode:D
876 \@@_primitive:NN \linedir \tex_linedir:D
877 \@@_primitive:NN \linedirection \tex_linedirection:D
878 \@@_primitive:NN \localbrokenpenalty \tex_localbrokenpenalty:D
879 \@@_primitive:NN \localinterlinepenalty \tex_localinterlinepenalty:D
880 \@@_primitive:NN \luabytecode \tex_luabytecode:D
881 \@@_primitive:NN \luabytecodecall \tex_luabytecodecall:D
882 \@@_primitive:NN \luacopyinputnodes \tex_luacopyinputnodes:D
883 \@@_primitive:NN \luadef \tex_luadef:D
884 \@@_primitive:NN \localleftbox \tex_localleftbox:D
885 \@@_primitive:NN \localrightbox \tex_localrightbox:D
886 \@@_primitive:NN \luaescapestring \tex_luaescapestring:D
887 \@@_primitive:NN \luafunction \tex_luafunction:D
888 \@@_primitive:NN \luafunctioncall \tex_luafunctioncall:D
889 \@@_primitive:NN \luatexbanner \tex_luatexbanner:D
890 \@@_primitive:NN \luatexrevision \tex_luatexrevision:D
891 \@@_primitive:NN \luatexversion \tex_luatexversion:D
892 \@@_primitive:NN \mathdefaultsmode \tex_mathdefaultsmode:D
893 \@@_primitive:NN \mathdelimitersmode \tex_mathdelimitersmode:D
894 \@@_primitive:NN \mathdir \tex_mathdir:D
895 \@@_primitive:NN \mathdirection \tex_mathdirection:D
896 \@@_primitive:NN \mathdisplayskipmode \tex_mathdisplayskipmode:D
897 \@@_primitive:NN \matheqdirmode \tex_matheqdirmode:D
898 \@@_primitive:NN \matheqnogapstep \tex_matheqnogapstep:D
899 \@@_primitive:NN \mathemptydisplaymode \tex_mathemptydisplaymode:D
900 \@@_primitive:NN \mathflattenmode \tex_mathflattenmode:D
901 \@@_primitive:NN \mathitalicsmode \tex_mathitalicsmode:D
902 \@@_primitive:NN \mathnolimitsmode \tex_mathnolimitsmode:D
903 \@@_primitive:NN \mathoption \tex_mathoption:D
904 \@@_primitive:NN \mathpenaltiesmode \tex_mathpenaltiesmode:D
905 \@@_primitive:NN \mathrulesfam \tex_mathrulesfam:D
906 % \@@_primitive:NN \mathrulesmode
907 % \tex_mathrulesmode:D % not documented in manual
908 % \@@_primitive:NN \mathrulethicknessmode
909 % \tex_mathrulethicknessmode:D % not documented in manual
910 \@@_primitive:NN \mathscriptsmode \tex_mathscriptsmode:D
911 \@@_primitive:NN \mathscriptboxmode \tex_mathscriptboxmode:D
912 \@@_primitive:NN \mathscriptcharmode \tex_mathscriptcharmode:D
913 \@@_primitive:NN \mathstyle \tex_mathstyle:D
914 \@@_primitive:NN \mathsurroundmode \tex_mathsurroundmode:D
915 \@@_primitive:NN \mathsurroundskip \tex_mathsurroundskip:D
916 \@@_primitive:NN \nohrule \tex_nohrule:D
917 \@@_primitive:NN \nokerns \tex_nokerns:D
918 \@@_primitive:NN \noligs \tex_noligs:D
919 \@@_primitive:NN \nospaces \tex_nospaces:D
920 \@@_primitive:NN \novrule \tex_novrule:D
921 \@@_primitive:NN \outputbox \tex_outputbox:D
922 \@@_primitive:NN \pagebottomoffset \tex_pagebottomoffset:D
923 \@@_primitive:NN \pagedir \tex_pagedir:D
924 \@@_primitive:NN \pagedirection \tex_pagedirection:D
925 \@@_primitive:NN \pageleftoffset \tex_pageleftoffset:D
926 \@@_primitive:NN \pagerightoffset \tex_pagerightoffset:D
927 \@@_primitive:NN \pagetopoffset \tex_pagetopoffset:D
928 \@@_primitive:NN \pardir \tex_pardir:D
929 \@@_primitive:NN \pardirection \tex_pardirection:D
930 \@@_primitive:NN \pdfextension \tex_pdfextension:D
931 \@@_primitive:NN \pdffeedback \tex_pdffeedback:D
932 \@@_primitive:NN \pdfvariable \tex_pdfvariable:D
933 \@@_primitive:NN \postexhyphenchar \tex_postexhyphenchar:D
934 \@@_primitive:NN \posthyphenchar \tex_posthyphenchar:D
935 \@@_primitive:NN \prebinoppenalty \tex_prebinoppenalty:D
936 \@@_primitive:NN \predisplaygapfactor \tex_predisplaygapfactor:D
937 \@@_primitive:NN \preexhyphenchar \tex_preexhyphenchar:D
938 \@@_primitive:NN \prehyphenchar \tex_prehyphenchar:D
939 \@@_primitive:NN \prerelpenalty \tex_prerelpenalty:D
940 \@@_primitive:NN \protrusionboundary \tex_protrusionboundary:D
941 \@@_primitive:NN \rightghost \tex_rightghost:D
942 \@@_primitive:NN \savecatcodetable \tex_savecatcodetable:D
943 \@@_primitive:NN \scantextokens \tex_scantextokens:D
944 \@@_primitive:NN \setfontid \tex_setfontid:D
945 \@@_primitive:NN \shapemode \tex_shapemode:D
946 \@@_primitive:NN \suppressifcsnameerror \tex_suppressifcsnameerror:D
947 \@@_primitive:NN \suppresslongerror \tex_suppresslongerror:D
948 \@@_primitive:NN \suppressmathparerror \tex_suppressmathparerror:D
949 \@@_primitive:NN \suppressoutererror \tex_suppressoutererror:D
950 \@@_primitive:NN \suppressprimitiveerror
951 \tex_suppressprimitiveerror:D
952 \@@_primitive:NN \textdir \tex_textdir:D
953 \@@_primitive:NN \textdirection \tex_textdirection:D
954 \@@_primitive:NN \toksapp \tex_toksapp:D
955 \@@_primitive:NN \tokspre \tex_tokspre:D
956 \@@_primitive:NN \tpack \tex_tpack:D
957 \@@_primitive:NN \variablefam \tex_variablefam:D
958 \@@_primitive:NN \vpack \tex_vpack:D
959 \@@_primitive:NN \wordboundary \tex_wordboundary:D
960 \@@_primitive:NN \xtoksapp \tex_xtoksapp:D
961 \@@_primitive:NN \xtokspre \tex_xtokspre:D
962 % \end{macrocode}
963 % Primitives from \pdfTeX{} that \LuaTeX{} renames.
964 % \begin{macrocode}
965 \@@_primitive:NN \adjustspacing \tex_adjustspacing:D
966 \@@_primitive:NN \copyfont \tex_copyfont:D
967 \@@_primitive:NN \draftmode \tex_draftmode:D
968 \@@_primitive:NN \expandglyphsinfont \tex_fontexpand:D
969 \@@_primitive:NN \ifabsdim \tex_ifabsdim:D
970 \@@_primitive:NN \ifabsnum \tex_ifabsnum:D
971 \@@_primitive:NN \ignoreligaturesinfont \tex_ignoreligaturesinfont:D
972 \@@_primitive:NN \insertht \tex_insertht:D
973 \@@_primitive:NN \lastsavedboxresourceindex
974 \tex_pdflastxform:D
975 \@@_primitive:NN \lastsavedimageresourceindex
976 \tex_pdflastximage:D
977 \@@_primitive:NN \lastsavedimageresourcepages
978 \tex_pdflastximagepages:D
979 \@@_primitive:NN \lastxpos \tex_lastxpos:D
980 \@@_primitive:NN \lastypos \tex_lastypos:D
981 \@@_primitive:NN \normaldeviate \tex_normaldeviate:D
982 \@@_primitive:NN \outputmode \tex_pdfoutput:D
983 \@@_primitive:NN \pageheight \tex_pageheight:D
984 \@@_primitive:NN \pagewidth \tex_pagewidth:D
985 \@@_primitive:NN \protrudechars \tex_protrudechars:D
986 \@@_primitive:NN \pxdimen \tex_pxdimen:D
987 \@@_primitive:NN \randomseed \tex_randomseed:D
988 \@@_primitive:NN \useboxresource \tex_pdfrefxform:D
989 \@@_primitive:NN \useimageresource \tex_pdfrefximage:D
990 \@@_primitive:NN \savepos \tex_savepos:D
991 \@@_primitive:NN \saveboxresource \tex_pdfxform:D
992 \@@_primitive:NN \saveimageresource \tex_pdfximage:D
993 \@@_primitive:NN \setrandomseed \tex_setrandomseed:D
994 \@@_primitive:NN \tracingfonts \tex_tracingfonts:D
995 \@@_primitive:NN \uniformdeviate \tex_uniformdeviate:D
996 % \end{macrocode}
997 % The set of Unicode math primitives were introduced by \XeTeX{} and \LuaTeX{}
998 % in a somewhat complex fashion: a few first as |\XeTeX...| which were then
999 % renamed with \LuaTeX{} having a lot more. These names now all start
1000 % |\U...| and mainly |\Umath...|.
1001 % \begin{macrocode}
1002 \@@_primitive:NN \Uchar \tex_Uchar:D
1003 \@@_primitive:NN \Ucharcat \tex_Ucharcat:D
1004 \@@_primitive:NN \Udelcode \tex_Udelcode:D
1005 \@@_primitive:NN \Udelcodenum \tex_Udelcodenum:D
1006 \@@_primitive:NN \Udelimiter \tex_Udelimiter:D
1007 \@@_primitive:NN \Udelimiterover \tex_Udelimiterover:D
1008 \@@_primitive:NN \Udelimiterunder \tex_Udelimiterunder:D
1009 \@@_primitive:NN \Uhextensible \tex_Uhextensible:D
1010 \@@_primitive:NN \Uleft \tex_Uleft:D
1011 \@@_primitive:NN \Umathaccent \tex_Umathaccent:D
1012 \@@_primitive:NN \Umathaxis \tex_Umathaxis:D
1013 \@@_primitive:NN \Umathbinbinspacing \tex_Umathbinbinspacing:D
1014 \@@_primitive:NN \Umathbinclosespacing \tex_Umathbinclosespacing:D
1015 \@@_primitive:NN \Umathbininnerspacing \tex_Umathbininnerspacing:D
1016 \@@_primitive:NN \Umathbinopenspacing \tex_Umathbinopenspacing:D
1017 \@@_primitive:NN \Umathbinopspacing \tex_Umathbinopspacing:D
1018 \@@_primitive:NN \Umathbinordspacing \tex_Umathbinordspacing:D
1019 \@@_primitive:NN \Umathbinpunctspacing \tex_Umathbinpunctspacing:D
1020 \@@_primitive:NN \Umathbinrelspacing \tex_Umathbinrelspacing:D
1021 \@@_primitive:NN \Umathchar \tex_Umathchar:D
1022 \@@_primitive:NN \Umathcharclass \tex_Umathcharclass:D
1023 \@@_primitive:NN \Umathchardef \tex_Umathchardef:D
1024 \@@_primitive:NN \Umathcharfam \tex_Umathcharfam:D
1025 \@@_primitive:NN \Umathcharnum \tex_Umathcharnum:D
1026 \@@_primitive:NN \Umathcharnumdef \tex_Umathcharnumdef:D
1027 \@@_primitive:NN \Umathcharslot \tex_Umathcharslot:D
1028 \@@_primitive:NN \Umathclosebinspacing \tex_Umathclosebinspacing:D
1029 \@@_primitive:NN \Umathcloseclosespacing
1030 \tex_Umathcloseclosespacing:D
1031 \@@_primitive:NN \Umathcloseinnerspacing
1032 \tex_Umathcloseinnerspacing:D
1033 \@@_primitive:NN \Umathcloseopenspacing \tex_Umathcloseopenspacing:D
1034 \@@_primitive:NN \Umathcloseopspacing \tex_Umathcloseopspacing:D
1035 \@@_primitive:NN \Umathcloseordspacing \tex_Umathcloseordspacing:D
1036 \@@_primitive:NN \Umathclosepunctspacing
1037 \tex_Umathclosepunctspacing:D
1038 \@@_primitive:NN \Umathcloserelspacing \tex_Umathcloserelspacing:D
1039 \@@_primitive:NN \Umathcode \tex_Umathcode:D
1040 \@@_primitive:NN \Umathcodenum \tex_Umathcodenum:D
1041 \@@_primitive:NN \Umathconnectoroverlapmin
1042 \tex_Umathconnectoroverlapmin:D
1043 \@@_primitive:NN \Umathfractiondelsize \tex_Umathfractiondelsize:D
1044 \@@_primitive:NN \Umathfractiondenomdown
1045 \tex_Umathfractiondenomdown:D
1046 \@@_primitive:NN \Umathfractiondenomvgap
1047 \tex_Umathfractiondenomvgap:D
1048 \@@_primitive:NN \Umathfractionnumup \tex_Umathfractionnumup:D
1049 \@@_primitive:NN \Umathfractionnumvgap \tex_Umathfractionnumvgap:D
1050 \@@_primitive:NN \Umathfractionrule \tex_Umathfractionrule:D
1051 \@@_primitive:NN \Umathinnerbinspacing \tex_Umathinnerbinspacing:D
1052 \@@_primitive:NN \Umathinnerclosespacing
1053 \tex_Umathinnerclosespacing:D
1054 \@@_primitive:NN \Umathinnerinnerspacing
1055 \tex_Umathinnerinnerspacing:D
1056 \@@_primitive:NN \Umathinneropenspacing \tex_Umathinneropenspacing:D
1057 \@@_primitive:NN \Umathinneropspacing \tex_Umathinneropspacing:D
1058 \@@_primitive:NN \Umathinnerordspacing \tex_Umathinnerordspacing:D
1059 \@@_primitive:NN \Umathinnerpunctspacing
1060 \tex_Umathinnerpunctspacing:D
1061 \@@_primitive:NN \Umathinnerrelspacing \tex_Umathinnerrelspacing:D
1062 \@@_primitive:NN \Umathlimitabovebgap \tex_Umathlimitabovebgap:D
1063 \@@_primitive:NN \Umathlimitabovekern \tex_Umathlimitabovekern:D
1064 \@@_primitive:NN \Umathlimitabovevgap \tex_Umathlimitabovevgap:D
1065 \@@_primitive:NN \Umathlimitbelowbgap \tex_Umathlimitbelowbgap:D
1066 \@@_primitive:NN \Umathlimitbelowkern \tex_Umathlimitbelowkern:D
1067 \@@_primitive:NN \Umathlimitbelowvgap \tex_Umathlimitbelowvgap:D
1068 \@@_primitive:NN \Umathnolimitsubfactor \tex_Umathnolimitsubfactor:D
1069 \@@_primitive:NN \Umathnolimitsupfactor \tex_Umathnolimitsupfactor:D
1070 \@@_primitive:NN \Umathopbinspacing \tex_Umathopbinspacing:D
1071 \@@_primitive:NN \Umathopclosespacing \tex_Umathopclosespacing:D
1072 \@@_primitive:NN \Umathopenbinspacing \tex_Umathopenbinspacing:D
1073 \@@_primitive:NN \Umathopenclosespacing \tex_Umathopenclosespacing:D
1074 \@@_primitive:NN \Umathopeninnerspacing \tex_Umathopeninnerspacing:D
1075 \@@_primitive:NN \Umathopenopenspacing \tex_Umathopenopenspacing:D
1076 \@@_primitive:NN \Umathopenopspacing \tex_Umathopenopspacing:D
1077 \@@_primitive:NN \Umathopenordspacing \tex_Umathopenordspacing:D
1078 \@@_primitive:NN \Umathopenpunctspacing \tex_Umathopenpunctspacing:D
1079 \@@_primitive:NN \Umathopenrelspacing \tex_Umathopenrelspacing:D
1080 \@@_primitive:NN \Umathoperatorsize \tex_Umathoperatorsize:D
1081 \@@_primitive:NN \Umathopinnerspacing \tex_Umathopinnerspacing:D
1082 \@@_primitive:NN \Umathopopenspacing \tex_Umathopopenspacing:D
1083 \@@_primitive:NN \Umathopopspacing \tex_Umathopopspacing:D
1084 \@@_primitive:NN \Umathopordspacing \tex_Umathopordspacing:D
1085 \@@_primitive:NN \Umathoppunctspacing \tex_Umathoppunctspacing:D
1086 \@@_primitive:NN \Umathoprelspacing \tex_Umathoprelspacing:D
1087 \@@_primitive:NN \Umathordbinspacing \tex_Umathordbinspacing:D
1088 \@@_primitive:NN \Umathordclosespacing \tex_Umathordclosespacing:D
1089 \@@_primitive:NN \Umathordinnerspacing \tex_Umathordinnerspacing:D
1090 \@@_primitive:NN \Umathordopenspacing \tex_Umathordopenspacing:D
1091 \@@_primitive:NN \Umathordopspacing \tex_Umathordopspacing:D
1092 \@@_primitive:NN \Umathordordspacing \tex_Umathordordspacing:D
1093 \@@_primitive:NN \Umathordpunctspacing \tex_Umathordpunctspacing:D
1094 \@@_primitive:NN \Umathordrelspacing \tex_Umathordrelspacing:D
1095 \@@_primitive:NN \Umathoverbarkern \tex_Umathoverbarkern:D
1096 \@@_primitive:NN \Umathoverbarrule \tex_Umathoverbarrule:D
1097 \@@_primitive:NN \Umathoverbarvgap \tex_Umathoverbarvgap:D
1098 \@@_primitive:NN \Umathoverdelimiterbgap
1099 \tex_Umathoverdelimiterbgap:D
1100 \@@_primitive:NN \Umathoverdelimitervgap
1101 \tex_Umathoverdelimitervgap:D
1102 \@@_primitive:NN \Umathpunctbinspacing \tex_Umathpunctbinspacing:D
1103 \@@_primitive:NN \Umathpunctclosespacing
1104 \tex_Umathpunctclosespacing:D
1105 \@@_primitive:NN \Umathpunctinnerspacing
1106 \tex_Umathpunctinnerspacing:D
1107 \@@_primitive:NN \Umathpunctopenspacing \tex_Umathpunctopenspacing:D
1108 \@@_primitive:NN \Umathpunctopspacing \tex_Umathpunctopspacing:D
1109 \@@_primitive:NN \Umathpunctordspacing \tex_Umathpunctordspacing:D
1110 \@@_primitive:NN \Umathpunctpunctspacing
1111 \tex_Umathpunctpunctspacing:D
1112 \@@_primitive:NN \Umathpunctrelspacing \tex_Umathpunctrelspacing:D
1113 \@@_primitive:NN \Umathquad \tex_Umathquad:D
1114 \@@_primitive:NN \Umathradicaldegreeafter
1115 \tex_Umathradicaldegreeafter:D
1116 \@@_primitive:NN \Umathradicaldegreebefore
1117 \tex_Umathradicaldegreebefore:D
1118 \@@_primitive:NN \Umathradicaldegreeraise
1119 \tex_Umathradicaldegreeraise:D
1120 \@@_primitive:NN \Umathradicalkern \tex_Umathradicalkern:D
1121 \@@_primitive:NN \Umathradicalrule \tex_Umathradicalrule:D
1122 \@@_primitive:NN \Umathradicalvgap \tex_Umathradicalvgap:D
1123 \@@_primitive:NN \Umathrelbinspacing \tex_Umathrelbinspacing:D
1124 \@@_primitive:NN \Umathrelclosespacing \tex_Umathrelclosespacing:D
1125 \@@_primitive:NN \Umathrelinnerspacing \tex_Umathrelinnerspacing:D
1126 \@@_primitive:NN \Umathrelopenspacing \tex_Umathrelopenspacing:D
1127 \@@_primitive:NN \Umathrelopspacing \tex_Umathrelopspacing:D
1128 \@@_primitive:NN \Umathrelordspacing \tex_Umathrelordspacing:D
1129 \@@_primitive:NN \Umathrelpunctspacing \tex_Umathrelpunctspacing:D
1130 \@@_primitive:NN \Umathrelrelspacing \tex_Umathrelrelspacing:D
1131 \@@_primitive:NN \Umathskewedfractionhgap
1132 \tex_Umathskewedfractionhgap:D
1133 \@@_primitive:NN \Umathskewedfractionvgap
1134 \tex_Umathskewedfractionvgap:D
1135 \@@_primitive:NN \Umathspaceafterscript \tex_Umathspaceafterscript:D
1136 \@@_primitive:NN \Umathstackdenomdown \tex_Umathstackdenomdown:D
1137 \@@_primitive:NN \Umathstacknumup \tex_Umathstacknumup:D
1138 \@@_primitive:NN \Umathstackvgap \tex_Umathstackvgap:D
1139 \@@_primitive:NN \Umathsubshiftdown \tex_Umathsubshiftdown:D
1140 \@@_primitive:NN \Umathsubshiftdrop \tex_Umathsubshiftdrop:D
1141 \@@_primitive:NN \Umathsubsupshiftdown \tex_Umathsubsupshiftdown:D
1142 \@@_primitive:NN \Umathsubsupvgap \tex_Umathsubsupvgap:D
1143 \@@_primitive:NN \Umathsubtopmax \tex_Umathsubtopmax:D
1144 \@@_primitive:NN \Umathsupbottommin \tex_Umathsupbottommin:D
1145 \@@_primitive:NN \Umathsupshiftdrop \tex_Umathsupshiftdrop:D
1146 \@@_primitive:NN \Umathsupshiftup \tex_Umathsupshiftup:D
1147 \@@_primitive:NN \Umathsupsubbottommax \tex_Umathsupsubbottommax:D
1148 \@@_primitive:NN \Umathunderbarkern \tex_Umathunderbarkern:D
1149 \@@_primitive:NN \Umathunderbarrule \tex_Umathunderbarrule:D
1150 \@@_primitive:NN \Umathunderbarvgap \tex_Umathunderbarvgap:D
1151 \@@_primitive:NN \Umathunderdelimiterbgap
1152 \tex_Umathunderdelimiterbgap:D
1153 \@@_primitive:NN \Umathunderdelimitervgap
1154 \tex_Umathunderdelimitervgap:D
1155 \@@_primitive:NN \Umiddle \tex_Umiddle:D
1156 \@@_primitive:NN \Unosubscript \tex_Unosubscript:D
1157 \@@_primitive:NN \Unosuperscript \tex_Unosuperscript:D
1158 \@@_primitive:NN \Uoverdelimiter \tex_Uoverdelimiter:D
1159 \@@_primitive:NN \Uradical \tex_Uradical:D
1160 \@@_primitive:NN \Uright \tex_Uright:D
1161 \@@_primitive:NN \Uroot \tex_Uroot:D
1162 \@@_primitive:NN \Uskewed \tex_Uskewed:D
1163 \@@_primitive:NN \Uskewedwithdelims \tex_Uskewedwithdelims:D
1164 \@@_primitive:NN \Ustack \tex_Ustack:D
1165 \@@_primitive:NN \Ustartdisplaymath \tex_Ustartdisplaymath:D
1166 \@@_primitive:NN \Ustartmath \tex_Ustartmath:D
1167 \@@_primitive:NN \Ustopdisplaymath \tex_Ustopdisplaymath:D
1168 \@@_primitive:NN \Ustopmath \tex_Ustopmath:D
1169 \@@_primitive:NN \Usubscript \tex_Usubscript:D
1170 \@@_primitive:NN \Usuperscript \tex_Usuperscript:D
1171 \@@_primitive:NN \Uunderdelimiter \tex_Uunderdelimiter:D
1172 \@@_primitive:NN \Uvextensible \tex_Uvextensible:D
1173 % \end{macrocode}
1174 % Primitives from \pTeX{}.
1175 % \begin{macrocode}
1176 \@@_primitive:NN \autospacing \tex_autospacing:D
1177 \@@_primitive:NN \autoxspacing \tex_autoxspacing:D
1178 \@@_primitive:NN \currentcjktoken \tex_currentcjktoken:D
1179 \@@_primitive:NN \currentspacingmode \tex_currentspacingmode:D
1180 \@@_primitive:NN \currentxspacingmode \tex_currentxspacingmode:D
1181 \@@_primitive:NN \disinhibitglue \tex_disinhibitglue:D
1182 \@@_primitive:NN \dtou \tex_dtou:D
1183 \@@_primitive:NN \epTeXinputencoding \tex_epTeXinputencoding:D
1184 \@@_primitive:NN \epTeXversion \tex_epTeXversion:D
1185 \@@_primitive:NN \euc \tex_euc:D
1186 \@@_primitive:NN \hfi \tex_hfi:D
1187 \@@_primitive:NN \ifdbox \tex_ifdbox:D
1188 \@@_primitive:NN \ifddir \tex_ifddir:D
1189 \@@_primitive:NN \ifjfont \tex_ifjfont:D
1190 \@@_primitive:NN \ifmbox \tex_ifmbox:D
1191 \@@_primitive:NN \ifmdir \tex_ifmdir:D
1192 \@@_primitive:NN \iftbox \tex_iftbox:D
1193 \@@_primitive:NN \iftfont \tex_iftfont:D
1194 \@@_primitive:NN \iftdir \tex_iftdir:D
1195 \@@_primitive:NN \ifybox \tex_ifybox:D
1196 \@@_primitive:NN \ifydir \tex_ifydir:D
1197 \@@_primitive:NN \inhibitglue \tex_inhibitglue:D
1198 \@@_primitive:NN \inhibitxspcode \tex_inhibitxspcode:D
1199 \@@_primitive:NN \jcharwidowpenalty \tex_jcharwidowpenalty:D
1200 \@@_primitive:NN \jfam \tex_jfam:D
1201 \@@_primitive:NN \jfont \tex_jfont:D
1202 \@@_primitive:NN \jis \tex_jis:D
1203 \@@_primitive:NN \kanjiskip \tex_kanjiskip:D
1204 \@@_primitive:NN \kansuji \tex_kansuji:D
1205 \@@_primitive:NN \kansujichar \tex_kansujichar:D
1206 \@@_primitive:NN \kcatcode \tex_kcatcode:D
1207 \@@_primitive:NN \kuten \tex_kuten:D
1208 \@@_primitive:NN \lastnodechar \tex_lastnodechar:D
1209 \@@_primitive:NN \lastnodefont \tex_lastnodefont:D
1210 \@@_primitive:NN \lastnodesubtype \tex_lastnodesubtype:D
1211 \@@_primitive:NN \noautospacing \tex_noautospacing:D
1212 \@@_primitive:NN \noautoxspacing \tex_noautoxspacing:D
1213 \@@_primitive:NN \pagefistretch \tex_pagefistretch:D
1214 \@@_primitive:NN \postbreakpenalty \tex_postbreakpenalty:D
1215 \@@_primitive:NN \prebreakpenalty \tex_prebreakpenalty:D
1216 \@@_primitive:NN \ptexfontname \tex_ptexfontname:D
1217 \@@_primitive:NN \ptexlineendmode \tex_lineendmode:D
1218 \@@_primitive:NN \ptexminorversion \tex_ptexminorversion:D
1219 \@@_primitive:NN \ptexrevision \tex_ptexrevision:D
1220 \@@_primitive:NN \ptextracingfonts \tex_ptextracingfonts:D
1221 \@@_primitive:NN \ptexversion \tex_ptexversion:D
1222 \@@_primitive:NN \readpapersizespecial \tex_readpapersizespecial:D
1223 \@@_primitive:NN \scriptbaselineshiftfactor
1224 \tex_scriptbaselineshiftfactor:D
1225 \@@_primitive:NN \scriptscriptbaselineshiftfactor
1226 \tex_scriptscriptbaselineshiftfactor:D
1227 \@@_primitive:NN \showmode \tex_showmode:D
1228 \@@_primitive:NN \sjis \tex_sjis:D
1229 \@@_primitive:NN \tate \tex_tate:D
1230 \@@_primitive:NN \tbaselineshift \tex_tbaselineshift:D
1231 \@@_primitive:NN \textbaselineshiftfactor
1232 \tex_textbaselineshiftfactor:D
1233 \@@_primitive:NN \tfont \tex_tfont:D
1234 \@@_primitive:NN \tojis \tex_tojis:D
1235 \@@_primitive:NN \toucs \tex_toucs:D
1236 \@@_primitive:NN \ucs \tex_ucs:D
1237 \@@_primitive:NN \xkanjiskip \tex_xkanjiskip:D
1238 \@@_primitive:NN \xspcode \tex_xspcode:D
1239 \@@_primitive:NN \ybaselineshift \tex_ybaselineshift:D
1240 \@@_primitive:NN \yoko \tex_yoko:D
1241 \@@_primitive:NN \vfi \tex_vfi:D
1242 % \end{macrocode}
1243 % Primitives from \upTeX{}.
1244 % \begin{macrocode}
1245 \@@_primitive:NN \disablecjktoken \tex_disablecjktoken:D
1246 \@@_primitive:NN \enablecjktoken \tex_enablecjktoken:D
1247 \@@_primitive:NN \forcecjktoken \tex_forcecjktoken:D
1248 \@@_primitive:NN \kchar \tex_kchar:D
1249 \@@_primitive:NN \kchardef \tex_kchardef:D
1250 \@@_primitive:NN \uptexrevision \tex_uptexrevision:D
1251 \@@_primitive:NN \uptexversion \tex_uptexversion:D
1252 % \end{macrocode}
1253 % Omega primitives provided by \pTeX{} (listed separately mainly to allow
1254 % understanding of their source).
1255 % \begin{macrocode}
1256 \@@_primitive:NN \odelcode \tex_odelcode:D
1257 \@@_primitive:NN \odelimiter \tex_odelimiter:D
1258 \@@_primitive:NN \omathaccent \tex_omathaccent:D
1259 \@@_primitive:NN \omathchar \tex_omathchar:D
1260 \@@_primitive:NN \omathchardef \tex_omathchardef:D
1261 \@@_primitive:NN \omathcode \tex_omathcode:D
1262 \@@_primitive:NN \oradical \tex_oradical:D
1263 % \end{macrocode}
1264 % Newer cross-engine primitives.
1265 % \begin{macrocode}
1266 \@@_primitive:NN \ignoreprimitiveerror \tex_ignoreprimitiveerror:D
1267 \@@_primitive:NN \partokencontext \tex_partokencontext:D
1268 \@@_primitive:NN \partokenname \tex_partokenname:D
1269 \@@_primitive:NN \showstream \tex_showstream:D
1270 \@@_primitive:NN \tracingstacklevels \tex_tracingstacklevels:D
1271 % \end{macrocode}
1272 % End of the \enquote{just the names} part of the source.
1273 % \begin{macrocode}
1274 %</names|code>
1275 %<*code>
1276 % \end{macrocode}
1277 %
1278 % The job is done: close the group (using the primitive renamed!).
1279 % \begin{macrocode}
1280 \tex_endgroup:D
1281 % \end{macrocode}
1282 %
1283 % \LaTeXe{} moves a few primitives, so these are sorted out.
1284 % In newer versions of \LaTeXe{}, \pkg{expl3} is loaded rather early, so
1285 % only some primitives are already renamed, so we need two tests here.
1286 % At the beginning of the \LaTeXe{} format, the primitives \tn{end} and
1287 % \tn{input} are renamed, and only later on the other ones.
1288 % \begin{macrocode}
1289 \tex_ifdefined:D \@@@@end
1290 \tex_let:D \tex_end:D \@@@@end
1291 \tex_let:D \tex_input:D \@@@@input
1292 \tex_fi:D
1293 % \end{macrocode}
1294 %
1295 % If \tn{@@@@hyph} is defined, we are loading \pkg{expl3} in a
1296 % pre-2020/10/01 release of \LaTeXe{}, so a few other primitives have to
1297 % be tested as well.
1298 % \begin{macrocode}
1299 \tex_ifdefined:D \@@@@hyph
1300 \tex_let:D \tex_everydisplay:D \frozen@everydisplay
1301 \tex_let:D \tex_everymath:D \frozen@everymath
1302 \tex_let:D \tex_hyphen:D \@@@@hyph
1303 \tex_let:D \tex_italiccorrection:D \@@@@italiccorr
1304 \tex_let:D \tex_underline:D \@@@@underline
1305 % \end{macrocode}
1306 % The \tn{shipout} primitive is particularly tricky as a number of packages
1307 % want to hook in here. First, we see if a sufficiently-new kernel has saved
1308 % a copy: if it has, just use that. Otherwise, we need to check each of the
1309 % possible packages/classes that might move it: here, we are looking for those
1310 % which do \emph{not} delay action to the \tn{AtBeginDocument} hook. (We
1311 % cannot use \tn{primitive} as that doesn't
1312 % allow us to make a direct copy of the primitive \emph{itself}.) As we know
1313 % that \LaTeXe{} is in use, we use it's \tn{@tfor} loop here.
1314 % \begin{macrocode}
1315 \tex_ifdefined:D \@@@@shipout
1316 \tex_let:D \tex_shipout:D \@@@@shipout
1317 \tex_fi:D
1318 \tex_begingroup:D
1319 \tex_edef:D \l_tmpa_tl { \tex_string:D \shipout }
1320 \tex_edef:D \l_tmpb_tl { \tex_meaning:D \shipout }
1321 \tex_ifx:D \l_tmpa_tl \l_tmpb_tl
1322 \tex_else:D
1323 \tex_expandafter:D \@tfor \tex_expandafter:D \@tempa \tex_string:D :=
1324 \CROP@shipout
1325 \dup@shipout
1326 \GPTorg@shipout
1327 \LL@shipout
1328 \mem@oldshipout
1329 \opem@shipout
1330 \pgfpages@originalshipout
1331 \pr@shipout
1332 \Shipout
1333 \verso@orig@shipout
1334 \do
1335 {
1336 \tex_edef:D \l_tmpb_tl
1337 { \tex_expandafter:D \tex_meaning:D \@tempa }
1338 \tex_ifx:D \l_tmpa_tl \l_tmpb_tl
1339 \tex_global:D \tex_expandafter:D \tex_let:D
1340 \tex_expandafter:D \tex_shipout:D \@tempa
1341 \tex_fi:D
1342 }
1343 \tex_fi:D
1344 \tex_endgroup:D
1345 % \end{macrocode}
1346 % Some tidying up is needed for \tn[index=tracingfonts]{(pdf)tracingfonts}.
1347 % Newer \LuaTeX{} has
1348 % this simply as \tn{tracingfonts}, but that is overwritten by
1349 % the \LaTeXe{} kernel. So any spurious definition has to be removed, then
1350 % the real version saved either from the \pdfTeX{} name or from \LuaTeX{}.
1351 % In the latter case, we leave \tn{@@tracingfonts} available: this might
1352 % be useful and almost all \LaTeXe{} users will have \pkg{expl3} loaded by
1353 % \pkg{fontspec}. (We follow the usual kernel convention that |@@| is used
1354 % for saved primitives.)
1355 % \begin{macrocode}
1356 \tex_let:D \tex_tracingfonts:D \tex_undefined:D
1357 \tex_ifdefined:D \pdftracingfonts
1358 \tex_let:D \tex_tracingfonts:D \pdftracingfonts
1359 \tex_else:D
1360 \tex_ifdefined:D \tex_directlua:D
1361 \tex_directlua:D { tex.enableprimitives("@@@@", {"tracingfonts"}) }
1362 \tex_let:D \tex_tracingfonts:D \@@@@tracingfonts
1363 \tex_fi:D
1364 \tex_fi:D
1365 \tex_fi:D
1366 % \end{macrocode}
1367 % Only \pdfTeX{} and \LuaTeX{} define \tn{pdfmapfile} and \tn{pdfmapline}:
1368 % Tidy up the fact that some format-building processes leave
1369 % a couple of questionable decisions about that!
1370 % \begin{macrocode}
1371 \tex_ifnum:D 0
1372 \tex_ifdefined:D \tex_pdftexversion:D 1 \tex_fi:D
1373 \tex_ifdefined:D \tex_luatexversion:D 1 \tex_fi:D
1374 = 0 %
1375 \tex_let:D \tex_pdfmapfile:D \tex_undefined:D
1376 \tex_let:D \tex_pdfmapline:D \tex_undefined:D
1377 \tex_fi:D
1378 % \end{macrocode}
1379 % A few packages do unfortunate things to date-related primitives.
1380 % \begin{macrocode}
1381 \tex_begingroup:D
1382 \tex_edef:D \l_tmpa_tl { \tex_meaning:D \tex_time:D }
1383 \tex_edef:D \l_tmpb_tl { \tex_string:D \time }
1384 \tex_ifx:D \l_tmpa_tl \l_tmpb_tl
1385 \tex_else:D
1386 \tex_global:D \tex_let:D \tex_time:D \tex_undefined:D
1387 \tex_fi:D
1388 \tex_edef:D \l_tmpa_tl { \tex_meaning:D \tex_day:D }
1389 \tex_edef:D \l_tmpb_tl { \tex_string:D \day }
1390 \tex_ifx:D \l_tmpa_tl \l_tmpb_tl
1391 \tex_else:D
1392 \tex_global:D \tex_let:D \tex_day:D \tex_undefined:D
1393 \tex_fi:D
1394 \tex_edef:D \l_tmpa_tl { \tex_meaning:D \tex_month:D }
1395 \tex_edef:D \l_tmpb_tl { \tex_string:D \month }
1396 \tex_ifx:D \l_tmpa_tl \l_tmpb_tl
1397 \tex_else:D
1398 \tex_global:D \tex_let:D \tex_month:D \tex_undefined:D
1399 \tex_fi:D
1400 \tex_edef:D \l_tmpa_tl { \tex_meaning:D \tex_year:D }
1401 \tex_edef:D \l_tmpb_tl { \tex_string:D \year }
1402 \tex_ifx:D \l_tmpa_tl \l_tmpb_tl
1403 \tex_else:D
1404 \tex_global:D \tex_let:D \tex_year:D \tex_undefined:D
1405 \tex_fi:D
1406 \tex_endgroup:D
1407 % \end{macrocode}
1408 % \pkg{cslatex} moves a couple of primitives which we recover here; as there
1409 % is no other marker, we can only work by looking for the names.
1410 % \begin{macrocode}
1411 \tex_ifdefined:D \orieveryjob
1412 \tex_let:D \tex_everyjob:D \orieveryjob
1413 \tex_fi:D
1414 \tex_ifdefined:D \oripdfoutput
1415 \tex_let:D \tex_pdfoutput:D \oripdfoutput
1416 \tex_fi:D
1417 % \end{macrocode}
1418 %
1419 % For \ConTeXt{}, two tests are needed. Both Mark~II and Mark~IV move several
1420 % primitives: these are all covered by the first test, again using \cs{end}
1421 % as a marker. For Mark~IV, a few more primitives are moved: they are
1422 % implemented using some Lua code in the current \ConTeXt{}.
1423 % \begin{macrocode}
1424 \tex_ifdefined:D \normalend
1425 \tex_let:D \tex_end:D \normalend
1426 \tex_let:D \tex_everyjob:D \normaleveryjob
1427 \tex_let:D \tex_input:D \normalinput
1428 \tex_let:D \tex_language:D \normallanguage
1429 \tex_let:D \tex_mathop:D \normalmathop
1430 \tex_let:D \tex_month:D \normalmonth
1431 \tex_let:D \tex_outer:D \normalouter
1432 \tex_let:D \tex_over:D \normalover
1433 \tex_let:D \tex_vcenter:D \normalvcenter
1434 \tex_let:D \tex_unexpanded:D \normalunexpanded
1435 \tex_let:D \tex_expanded:D \normalexpanded
1436 \tex_fi:D
1437 \tex_ifdefined:D \normalitaliccorrection
1438 \tex_let:D \tex_hoffset:D \normalhoffset
1439 \tex_let:D \tex_italiccorrection:D \normalitaliccorrection
1440 \tex_let:D \tex_voffset:D \normalvoffset
1441 \tex_let:D \tex_showtokens:D \normalshowtokens
1442 \tex_fi:D
1443 \tex_ifdefined:D \normalleft
1444 \tex_let:D \tex_left:D \normalleft
1445 \tex_let:D \tex_middle:D \normalmiddle
1446 \tex_let:D \tex_right:D \normalright
1447 \tex_fi:D
1448 % \end{macrocode}
1449 %
1450 % \begin{macrocode}
1451 %</code>
1452 % \end{macrocode}
1453 %
1454 % In \LuaTeX{}, we additionally emulate some primitives using Lua code.
1455 % \begin{macrocode}
1456 %<*lua>
1457 % \end{macrocode}
1458 %
1459 % \begin{macro}[no-user-doc]{\tex_strcmp:D}
1460 % Compare two strings, expanding to |0| if they are equal,
1461 % |-1| if the first one is smaller and |1| if the second one is smaller.
1462 % Here \enquote{smaller} refers to codepoint order which does not correspond to
1463 % the user expected order for most non-ASCII strings.
1464 % \begin{macrocode}
1465 local minus_tok = token_new(string.byte'-', 12)
1466 local zero_tok = token_new(string.byte'0', 12)
1467 local one_tok = token_new(string.byte'1', 12)
1468 luacmd('tex_strcmp:D', function()
1469 local first = scan_string()
1470 local second = scan_string()
1471 if first < second then
1472 put_next(minus_tok, one_tok)
1473 else
1474 put_next(first == second and zero_tok or one_tok)
1475 end
1476 end, 'global')
1477 % \end{macrocode}
1478 % \end{macro}
1479 %
1480 % \begin{macro}[no-user-doc]{\tex_Ucharcat:D}
1481 % Creating arbitrary chars using |tex.cprint|.
1482 % The alternative approach using |token.new(...)| is about 10\% slower
1483 % but needed to create arbitrary space tokens.
1484 % \begin{macrocode}
1485 local sprint = tex.sprint
1486 local cprint = tex.cprint
1487 luacmd('tex_Ucharcat:D', function()
1488 local charcode = scan_int()
1489 local catcode = scan_int()
1490 if catcode == 10 then
1491 sprint(token_new(charcode, 10))
1492 else
1493 cprint(catcode, utf8_char(charcode))
1494 end
1495 end, 'global')
1496 % \end{macrocode}
1497 % \end{macro}
1498 %
1499 % \begin{macro}[no-user-doc]{\tex_filesize:D}
1500 % Wrap the function from |ltxutils|.
1501 % \begin{macrocode}
1502 luacmd('tex_filesize:D', function()
1503 local size = filesize(scan_string())
1504 if size then write(size) end
1505 end, 'global')
1506 % \end{macrocode}
1507 % \end{macro}
1508 %
1509 % \begin{macro}[no-user-doc]{\tex_mdfivesum:D}
1510 % There are two cases: Either hash a file or a string.
1511 % Both are already implemented in l3luatex or built-in.
1512 % \begin{macrocode}
1513 luacmd('tex_mdfivesum:D', function()
1514 local hash
1515 if scan_keyword"file" then
1516 hash = filemd5sum(scan_string())
1517 else
1518 hash = md5_HEX(scan_string())
1519 end
1520 if hash then write(hash) end
1521 end, 'global')
1522 % \end{macrocode}
1523 % \end{macro}
1524 %
1525 % \begin{macro}[no-user-doc]{\tex_filemoddate:D}
1526 % A primitive for getting the modification date of a file.
1527 % \begin{macrocode}
1528 luacmd('tex_filemoddate:D', function()
1529 local date = filemoddate(scan_string())
1530 if date then write(date) end
1531 end, 'global')
1532 % \end{macrocode}
1533 % \end{macro}
1534 %
1535 % \begin{macro}[no-user-doc]{\tex_filedump:D}
1536 % An emulated primitive for getting a hexdump from a (partial) file.
1537 % The length has a default of |0|. This is consistent with
1538 % \pdfTeX, but it effectively makes the primitive useless without an
1539 % explicit |length|. Therefore we allow the keyword |whole| to be used
1540 % instead of a length, indicating that the whole remaining file should
1541 % be read.
1542 % \begin{macrocode}
1543 luacmd('tex_filedump:D', function()
1544 local offset = scan_keyword'offset' and scan_int() or nil
1545 local length = scan_keyword'length' and scan_int()
1546 or not scan_keyword'whole' and 0 or nil
1547 local data = filedump(scan_string(), offset, length)
1548 if data then write(data) end
1549 end, 'global')
1550 % \end{macrocode}
1551 % \end{macro}
1552 %
1553 % \begin{macrocode}
1554 %</lua>
1555 % \end{macrocode}
1556 %
1557 % \end{implementation}
1558 %
1559 % \PrintIndex