summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/expl3/l3names.dtx
blob: 3bd4dbf261243d47c3deb9bf6ecef5b4b1381ef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
% \iffalse
%% File: l3names.dtx Copyright (C) 1990-2006 LaTeX3 project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
%% license or (at your option) any later version.  The latest version
%% of this license is in the file
%%
%%    http://www.latex-project.org/lppl.txt
%%
%% This file is part of the ``expl3 bundle'' (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
%%
%% -----------------------------------------------------------------------
%%
%% The development version of the bundle can be found at
%%
%%    http://www.latex-project.org/cgi-bin/cvsweb.cgi/
%%
%% for those people who are interested.
%%
%%%%%%%%%%%
%% NOTE: %%
%%%%%%%%%%%
%%
%%   Snapshots taken from the repository represent work in progress and may
%%   not work or may contain conflicting material!  We therefore ask
%%   people _not_ to put them into distributions, archives, etc. without
%%   prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
%^^A We need some basic initial character codes to be set up
%^^A immediately.
%<*initex>
\catcode`\{=1 % left brace is begin-group character
\catcode`\}=2 % right brace is end-group character
\catcode`\#=6 % hash mark is macro parameter character
\catcode`\^=7 %
\catcode`\^^I=10 % ascii tab is a blank space
%</initex>
%<package>\begingroup
%<*initex|package>
\def\GetIdInfo$#1 #2.#3 #4 #5 #6 #7${%
  \GetIdInfoAux #5\relax{#2}#5\relax{#4}%
}
\def\GetIdInfoAux #1#2#3#4#5#6\relax{%
  \ifx#5/%
    \expandafter\GetIdInfoAuxCVS
  \else
    \expandafter\GetIdInfoAuxSVN
  \fi
}
%</initex|package>
%<*initex>
\def\GetIdInfoAuxCVS #1#2\relax#3#4{%
  \immediate\write-1{#1; v#2, #3; #4}%
}
\def\GetIdInfoAuxSVN #1#2-#3-#4\relax#5#6{%
  \immediate\write-1{#1; #2/#3/#4 v#5 #6}%
}
%</initex>
%<*package>
\def\GetIdInfoAuxCVS #1#2\relax#3#4{%
  \gdef\fileversion{#3}%
  \gdef\filedate{#2}%
  \gdef\filedescription{#4}%
  \ProvidesPackage{#1}[#2 v#3 #4]%
}
\def\GetIdInfoAuxSVN #1#2-#3-#4\relax#5#6{%
  \gdef\fileversion{#5}%
  \gdef\filedate{#2/#3/#4}%
  \gdef\filedescription{#6}%
  \ProvidesPackage{#1}[#2/#3/#4 v#5 #6]
}
%</package>
%<*driver>
\RequirePackage{l3names}
%</driver>
%\fi
\GetIdInfo$Id: l3names.dtx 621 2007-09-01 20:14:19Z morten $
     {L3 Experimental Naming Scheme for TeX Primitives}
%
%
% \iffalse
%<package>\endgroup
%<*driver>
%\fi
\ProvidesFile{l3names.dtx}
  [\filedate\space v\fileversion\space\filedescription]
%\iffalse
\documentclass{l3doc}
\begin{document}
\DocInput{l3names.dtx}
\end{document}
%</driver>
% \fi
%
% \title{The \textsf{l3names} package\thanks{This file
%         has version number \fileversion, last
%         revised \filedate.}\\
% A systematic naming scheme for \TeX}
% \author{\Team}
% \date{\filedate}
% \maketitle
%
% \changes{v2.0a}{1997/08/04}
%      {new consistent tex module name for \TeX\ primitives}
%
% \begin{abstract}
% This package sets up an experimental naming scheme for
% \LaTeX\ commands. It allows the \LaTeX\ programmer to systematically
% name functions and variables, and specify the argument types of
% functions.
%
% The \TeX\ primitives are all given a new name according to these
% conventions.
%
% \begin{bfseries}
% Warning: This package, and all packages using it should be regarded as
% \emph{expermiental}!
%
% The names of these packages, and the names and syntax of any commands
% defined in them might change at any time.
%
% These conventions are being distributed in this form to encourage
% discussion and experimentation. It is \emph{not} intentended that
% these packages be used in `real' documents at this stage.
% \end{bfseries}
% \end{abstract}
%
%
% \section{Conventions}
%
% This section gives an overview of the syntax for \LaTeX\ commands
% that is set up for use in these `experimental' pacages.
%
% Commands in \LaTeX3 are either functions or parameters. All
% primitive commands of \TeX{} have private names.
%
% \subsection{Functions}
%
% Functions have the following general syntax:
% \begin{quote}
%   |\|\m{module}|_|\m{description}|:|\m{arg-spec}
% \end{quote}
% where \m{module} is one of the (to be) chosen module names and
% \m{description} is a verbal description of the functionality.
% \m{arg-spec} finally describes the type of arguments that the
% function takes and is left empty if it is a function without
% arguments.
%
% All three parts consists of letters only \m{description} is allowed
% to take further |_| characters to separate words is necessary.
%
% Currently there exists some functions which don't have a proper
% \m{module} name.
%
% As a semi-formalized concept the letter |g| is sometimes used to
% prefix the \m{module} name and certain parts of the \m{description}
% to mark the function as ``globally acting''.
%
% The \m{arg-spec} currently supports the following types of
% arguments:
% \begin{description}
%
% \item[n] Unexpanded token (or token-list if in braces) braces.
%
% \item[o] One time expanded token or token-list. In the latter case,
% effectively only the first token in the list gets expanded. Since
% the expansion might result in more than one token, the result is
% surrounded for further processing with braces.
%
% \item[x] Fully expanded token or token-list. Like |o| but the
% argument is expanded using |\def:Npx| before it is passed on.
%
% \item[c] A character string or a token-list that expands to
% characters of catcode 11 or 12. This string (after expansion) is
% used to construct a command name that is eventually passed on.
%
% \item[N,O,X] Like |n|, |o|, |x| but the argument must be a single
% token without any braces around it.
%
% \item[w] One or more arguments with ``weird'' syntax that one has
% to know by heart or better leave it alone.
%
% \item[p] Denotes parameter text specification part, e.g.\^^M
% |#1#2\q_stop#3|.
%
% \item[T,F] denotes the ``true'' or the ``false'' case in a
% functional predicate.
%
% \end{description}
%
% Especially for the new names of \TeX{} primitives there are is one
% more character to denote arguments. It implies that these
% functions should not be used outside this bootstrapping file.
% \begin{description}
%
% \item[D] Zero or more arguments with  ``weird'' syntax. Uppercase
% ``D''  means (DON'T USE IT), i.e.,
% that this is a primitive \TeX{} command that should
% not show up in code except in the very basic functions of \LaTeX3
% that provide a more sensible interface.
%
% \end{description}
%
% One could perhaps envisage an extended system which allocated
% letters to denote the various primitive argument types available in
% \TeX, however it seems that this just complicates the system
% without adding any real benefit, as these primitives would never be
% used in production code, as higher level packages should offer a
% better interface. Thus the following letters, although they were
% considered have not been used. ``D'' is used in most cases in
% preference.
% \begin{description}
% \item[i] Denotes an integer in \TeX{} notation (which might be a
% register or \dots).
%
% \item[d] Denotes a dimension in \TeX{} notation.
%
% \item[g] Denotes a glue in \TeX{} notation.
%
% \item[m] Denotes an muglue or mukern in \TeX{} notation.
%
% \item[b] Denotes a box specification in \TeX{} notation (again
% something pretty arbitrary).
%
% \item[r] Denotes a rule specification in \TeX{} notation.
%
% \end{description}
%
% Some of the primitive functions below are flagged ``D'' even if
% they actually might be useful in average code. So certainly there
% are some adjustments necessary. It all depends whether or not we
% provide some safer interface or leave them alone.
%
% \subsection{Parameters}
%
% Parameter names have the following general syntax:
% \begin{quote}
%   |\|\m{access}|_|\m{module}|_|\m{description}|_|\m{type}
% \end{quote}
%
% \m{module} and \m{description} is as above. \m{type} should denote
% the type of parameter if this helps in using it. The currently used
% types are:
% \begin{description}
%
% \item[int] Integer valued.
%
% \item[factor] Another integer value type. Used for things where the
% parameter is used as a factor for something else.
%
% \item[status] The sort of boolean stuff \TeX{} provides. Essentially
% an integer with the meaning |0| = `off' and other values may or may
% not have sensible meanings.
%
% \item[pen] Another integer describing penalties.
%
% \item[dem] The demerits.
%
% \item[dim] A dimension.
%
% \item[skip] A glue value.
%
% \item[toks] A toks register (sort of).
%
% \item[char] An integer denoting a character.
%
% \item[muskip] A math unit.
%
% \end{description}
%
% \m{access} describes how the parameter can be accessed. The
% following characters are possible:
% \begin{description}
%
% \item[c] A constant. Should not be set in the code except with
% special functions to define the value for the whole processing.
%
% \item[C] A constant according to \TeX's rules. Can not be changed at
% all.
%
% \item[l] A local variable which therefore should not be changed
% globally.
%
% \item[L] A local variable that is usually set (and/or reset) by
% \TeX{} itself.
%
% \item[g] A global variable.
%
% \item[G] A global variable that is usually set (and/or reset by \TeX.
%
% \item[R] A  variable that is set (and changed) by \TeX{} and can not
% be changed by in the code (read-only).
%
% \end{description}
%
% 
%
% \section{Modules}
%
% Nearly all operations of \LaTeX3 are carried out by calling control
% sequences. For better programming concepts many types of functions are
% identified and gathered in modules. Functions in such modules starts
% with special prefixes, for example "\tlp_" is the prefix for functions
% dealing with token list pointers.
%
% \subsection{Using the modules}
%
% Most of the modules can be used on top of \LaTeX\ and are loaded
% with the usual "\usepackage" or "\RequirePackage" instructions. As
% the packages use a coding syntax different from standard \LaTeX\ it
% provides a few functions for setting it up.
%
% \begin{function}{
%     \ExplSyntaxOn |
%     \ExplSyntaxOff 
%   } 
%   \begin{syntax}
%     "\ExplSyntaxOn" <code>  "\ExplSyntaxOff"
%   \end{syntax} 
%   Issues a catcode regime where spaces are ignored and colon and
%   underscore are letters.
% \end{function}
% 
% \begin{function}{
%     l3names |
%     \ProvidesExplPackage |
%     \ProvidesExplClass 
%   } 
%   \begin{syntax}
%     "\RequirePackage{l3names}" \\
%     "\ProvidesExplPackage" "{"<package>"}"
%     "{"<date>"}" "{"<version>"}" "{"<description>"}"
%   \end{syntax} 
%   The package "l3names" (this module) provides
%   "\ProvidesExplPackage" which is a wrapper for "\ProvidesPackage"
%   and sets up the \LaTeX3 catcode settings for programming
%   automatically. Similar for the relationship between
%   "\ProvidesExplClass" and "\ProvidesClass". Spaces are not ignored
%   in the arguments of these commands.
% \end{function}
%
% \begin{function}{
%     \GetIdInfo      |
%     \filename       |
%     \filenameext    |
%     \filedate       |
%     \fileversion    |
%     \filetimestamp  | 
%     \fileauthor
%   } 
%   \begin{syntax}
%     "\RequirePackage{l3names}" \\
%     "\GetIdInfo" "$Id:" <cvs or svn info field> "$" "{"<description>"}"
%   \end{syntax} 
%   Extracts all information from a cvs or svn field. Spaces are not
%   ignored in these fields. The information pieces are stored in
%   separate control sequences with "\filename" for the part of the
%   file name leading up to the period, "\filenameext" for the
%   extension, "\filedate" for date, "\fileversion" for version,
%   "\filetimestamp" for the time and "\fileauthor" for the author.
% \end{function}
%
% To summarize: Every single package using this syntax should identify
% itself using one of the above methods. Special care is taken so that
% every package or class file loaded with "\RequirePackage" or alike
% are loaded with usual \LaTeX\ catcodes and the \LaTeX3 catcode
% scheme is reloaded when needed afterwards. See implementation for
% details. If you use the "\GetIdInfo" command you can use the
% information when loading a package with
% \begin{verbatim}
% \ProvidesExplPackage{\filename}{\filedate}{\fileversion}{\filedescription}
% \end{verbatim}
%
%
%
%
% \StopEventually{}
%
% \section{Starters}
%
%    This is the base part of \LaTeX3 defining things like |catcode|s
%    and redefining the \TeX{} primitives.
%
%    We start by setting up |\catcode|s that we need to define new
%    commands. These are the ones for begin-group and end-group
%    characters.\footnote{Well not needed while this file is running
%    as a package on top of \LaTeXe, so omitted from the package code}
%    \begin{macrocode}
%<*initex>
\catcode`\{=1 % left brace is begin-group character
\catcode`\}=2 % right brace is end-group character
\catcode`\#=6 % hash mark is macro parameter character
\catcode`\^=7 %
\catcode`\^^I=10 % ascii tab is a blank space
%</initex>
%    \end{macrocode}
% Reason for |\endlinechar=32| is that a line ending with a backslash
% will be interpreted as the token \verb*|\ | which seems most natural
% and since spaces are ignored it works as we intend elsewhere.
%    \begin{macrocode}
%<*initex|package>
\catcode126=10\relax  % tilde is a space char.
\catcode32=9\relax    % space is ignored
\catcode9=9\relax     % tab also ignored
\endlinechar=32\relax % endline is space
\catcode95=11\relax   % underscore letter
\catcode58=11\relax   % colon letter
%    \end{macrocode}
%
%
% \section{Setting up primitive names}
%
%    Here is the function that renames \TeX{}'s primitives.
%
% Normally the old name is left untouched, but the possibility of
% undefining the original names is made available by docstrip and
% package options.
% If nothing else, this gives a way of checking what `old code' a
% package depends on\ldots\
%
% If the package option `removeoldnames' is used then some trick code
% is run after the end of this file, to skip past the code which has
% been inserted by \LaTeXe\ to manage the file name stack, this code
% would break if run once the \TeX\ primitives have been undefined.
% (What a surprise!) \textbf{The option has been temporarily
%   disabled.}
%
% To get things started, give a new name for |\let|.
%    \begin{macrocode}
\let\tex_let:D\let
%</initex|package>
%    \end{macrocode}
%
% and now an internal function to  possibly
% remove the old name.
%
%    \begin{macrocode}
%<*initex>
\long\def\name_undefine:N#1{
    \tex_let:D#1\c_undefined}
%</initex>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*package>
\DeclareOption{removeoldnames}{
  \long\def\name_undefine:N#1{
    \tex_let:D#1\c_undefined}}
%    \end{macrocode}
%
%    \begin{macrocode}
\DeclareOption{keepoldnames}{
  \long\def\name_undefine:N#1{}}
%    \end{macrocode}
%
%    \begin{macrocode}
\ExecuteOptions{keepoldnames}
%    \end{macrocode}
%
%    \begin{macrocode}
\ProcessOptions
%</package>
%    \end{macrocode}
%
% The internal function to give the new name and possibly undefine
% the old name.
%    \begin{macrocode}
%<*initex|package>
\long\def\name_primitive:NN#1#2{
  \tex_let:D #2 #1
  \name_undefine:N #1
      }
%    \end{macrocode}
%
% \subsection{Assignments}
%
% In the current incarnation of this package, all \TeX\ primitives
% are given a new name of the form |\tex_|\emph{oldname}|:D|.
% But first three special cases which have symbolic original names.
% These are given modified new names, so that they may be entered
% without catcode tricks.
%    \begin{macrocode}
\name_primitive:NN \                      \tex_space:D
\name_primitive:NN \/                     \tex_italiccor:D
\name_primitive:NN \-                     \tex_hyphen:D
%    \end{macrocode}
%
% Now all the other primitives.
%    \begin{macrocode}
\name_primitive:NN \let                   \tex_let:D
\name_primitive:NN \def                   \tex_def:D
\name_primitive:NN \edef                  \tex_edef:D
\name_primitive:NN \gdef                  \tex_gdef:D
\name_primitive:NN \xdef                  \tex_xdef:D
\name_primitive:NN \chardef               \tex_chardef:D
\name_primitive:NN \countdef              \tex_countdef:D
\name_primitive:NN \dimendef              \tex_dimendef:D
\name_primitive:NN \skipdef               \tex_skipdef:D
\name_primitive:NN \muskipdef             \tex_muskipdef:D
\name_primitive:NN \mathchardef           \tex_mathchardef:D
\name_primitive:NN \toksdef               \tex_toksdef:D
\name_primitive:NN \futurelet             \tex_futurelet:D
\name_primitive:NN \advance               \tex_advance:D
\name_primitive:NN \divide                \tex_divide:D
\name_primitive:NN \multiply              \tex_multiply:D
\name_primitive:NN \font                  \tex_font:D
\name_primitive:NN \fam                   \tex_fam:D
\name_primitive:NN \global                \tex_global:D
\name_primitive:NN \long                  \tex_long:D
\name_primitive:NN \outer                 \tex_outer:D
\name_primitive:NN \setlanguage           \tex_setlanguage:D
\name_primitive:NN \globaldefs            \tex_globaldefs:D
\name_primitive:NN \afterassignment       \tex_afterassignment:D
\name_primitive:NN \aftergroup            \tex_aftergroup:D
\name_primitive:NN \expandafter           \tex_expandafter:D
\name_primitive:NN \noexpand              \tex_noexpand:D
\name_primitive:NN \begingroup            \tex_begingroup:D
\name_primitive:NN \endgroup              \tex_endgroup:D
\name_primitive:NN \halign                \tex_halign:D
\name_primitive:NN \valign                \tex_valign:D
\name_primitive:NN \cr                    \tex_cr:D
\name_primitive:NN \crcr                  \tex_crcr:D
\name_primitive:NN \noalign               \tex_noalign:D
\name_primitive:NN \omit                  \tex_omit:D
\name_primitive:NN \span                  \tex_span:D
\name_primitive:NN \tabskip               \tex_tabskip:D
\name_primitive:NN \everycr               \tex_everycr:D
\name_primitive:NN \if                    \tex_if:D
\name_primitive:NN \ifcase                \tex_ifcase:D
\name_primitive:NN \ifcat                 \tex_ifcat:D
\name_primitive:NN \ifnum                 \tex_ifnum:D
\name_primitive:NN \ifodd                 \tex_ifodd:D
\name_primitive:NN \ifdim                 \tex_ifdim:D
\name_primitive:NN \ifeof                 \tex_ifeof:D
\name_primitive:NN \ifhbox                \tex_ifhbox:D
\name_primitive:NN \ifvbox                \tex_ifvbox:D
\name_primitive:NN \ifvoid                \tex_ifvoid:D
\name_primitive:NN \ifx                   \tex_ifx:D
\name_primitive:NN \iffalse               \tex_iffalse:D
\name_primitive:NN \iftrue                \tex_iftrue:D
\name_primitive:NN \ifhmode               \tex_ifhmode:D
\name_primitive:NN \ifmmode               \tex_ifmmode:D
\name_primitive:NN \ifvmode               \tex_ifvmode:D
\name_primitive:NN \ifinner               \tex_ifinner:D
\name_primitive:NN \else                  \tex_else:D
\name_primitive:NN \fi                    \tex_fi:D
\name_primitive:NN \or                    \tex_or:D
\name_primitive:NN \immediate             \tex_immediate:D
\name_primitive:NN \closeout              \tex_closeout:D
\name_primitive:NN \openin                \tex_openin:D
\name_primitive:NN \openout               \tex_openout:D
\name_primitive:NN \read                  \tex_read:D
\name_primitive:NN \write                 \tex_write:D
\name_primitive:NN \closein               \tex_closein:D
\name_primitive:NN \newlinechar           \tex_newlinechar:D
\name_primitive:NN \input                 \tex_input:D
\name_primitive:NN \endinput              \tex_endinput:D
\name_primitive:NN \inputlineno           \tex_inputlineno:D
\name_primitive:NN \errmessage            \tex_errmessage:D
\name_primitive:NN \message               \tex_message:D
\name_primitive:NN \show                  \tex_show:D
\name_primitive:NN \showthe               \tex_showthe:D
\name_primitive:NN \showbox               \tex_showbox:D
\name_primitive:NN \showlists             \tex_showlists:D
\name_primitive:NN \errhelp               \tex_errhelp:D
\name_primitive:NN \errorcontextlines     \tex_errorcontextlines:D
\name_primitive:NN \tracingcommands       \tex_tracingcommands:D
\name_primitive:NN \tracinglostchars      \tex_tracinglostchars:D
\name_primitive:NN \tracingmacros         \tex_tracingmacros:D
\name_primitive:NN \tracingonline         \tex_tracingonline:D
\name_primitive:NN \tracingoutput         \tex_tracingoutput:D
\name_primitive:NN \tracingpages          \tex_tracingpages:D
\name_primitive:NN \tracingparagraphs     \tex_tracingparagraphs:D
\name_primitive:NN \tracingrestores       \tex_tracingrestores:D
\name_primitive:NN \tracingstats          \tex_tracingstats:D
\name_primitive:NN \pausing               \tex_pausing:D
\name_primitive:NN \showboxbreadth        \tex_showboxbreadth:D
\name_primitive:NN \showboxdepth          \tex_showboxdepth:D
\name_primitive:NN \batchmode             \tex_batchmode:D
\name_primitive:NN \errorstopmode         \tex_errorstopmode:D
\name_primitive:NN \nonstopmode           \tex_nonstopmode:D
\name_primitive:NN \scrollmode            \tex_scrollmode:D
\name_primitive:NN \end                   \tex_end:D
\name_primitive:NN \csname                \tex_csname:D
\name_primitive:NN \endcsname             \tex_endcsname:D
\name_primitive:NN \ignorespaces          \tex_ignorespaces:D
\name_primitive:NN \relax                 \tex_relax:D
\name_primitive:NN \the                   \tex_the:D
\name_primitive:NN \mag                   \tex_mag:D
\name_primitive:NN \language              \tex_language:D
\name_primitive:NN \mark                  \tex_mark:D
\name_primitive:NN \topmark               \tex_topmark:D
\name_primitive:NN \firstmark             \tex_firstmark:D
\name_primitive:NN \botmark               \tex_botmark:D
\name_primitive:NN \splitfirstmark        \tex_splitfirstmark:D
\name_primitive:NN \splitbotmark          \tex_splitbotmark:D
\name_primitive:NN \fontname              \tex_fontname:D
\name_primitive:NN \escapechar            \tex_escapechar:D
\name_primitive:NN \endlinechar           \tex_endlinechar:D
\name_primitive:NN \mathchoice            \tex_mathchoice:D
\name_primitive:NN \delimiter             \tex_delimiter:D
\name_primitive:NN \mathaccent            \tex_mathaccent:D
\name_primitive:NN \mathchar              \tex_mathchar:D
\name_primitive:NN \mskip                 \tex_mskip:D
\name_primitive:NN \radical               \tex_radical:D
\name_primitive:NN \vcenter               \tex_vcenter:D
\name_primitive:NN \mkern                 \tex_mkern:D
\name_primitive:NN \above                 \tex_above:D
\name_primitive:NN \abovewithdelims       \tex_abovewithdelims:D
\name_primitive:NN \atop                  \tex_atop:D
\name_primitive:NN \atopwithdelims        \tex_atopwithdelims:D
\name_primitive:NN \over                  \tex_over:D
\name_primitive:NN \overwithdelims        \tex_overwithdelims:D
\name_primitive:NN \displaystyle          \tex_displaystyle:D
\name_primitive:NN \textstyle             \tex_textstyle:D
\name_primitive:NN \scriptstyle           \tex_scriptstyle:D
\name_primitive:NN \scriptscriptstyle     \tex_scriptscriptstyle:D
\name_primitive:NN \nonscript             \tex_nonscript:D
\name_primitive:NN \eqno                  \tex_eqno:D
\name_primitive:NN \leqno                 \tex_leqno:D
\name_primitive:NN \abovedisplayshortskip \tex_abovedisplayshortskip:D
\name_primitive:NN \abovedisplayskip      \tex_abovedisplayskip:D
\name_primitive:NN \belowdisplayshortskip \tex_belowdisplayshortskip:D
\name_primitive:NN \belowdisplayskip      \tex_belowdisplayskip:D
\name_primitive:NN \displaywidowpenalty   \tex_displaywidowpenalty:D
\name_primitive:NN \displayindent         \tex_displayindent:D
\name_primitive:NN \displaywidth          \tex_displaywidth:D
\name_primitive:NN \everydisplay          \tex_everydisplay:D
\name_primitive:NN \predisplaysize        \tex_predisplaysize:D
\name_primitive:NN \predisplaypenalty     \tex_predisplaypenalty:D
\name_primitive:NN \postdisplaypenalty    \tex_postdisplaypenalty:D
\name_primitive:NN \mathbin               \tex_mathbin:D
\name_primitive:NN \mathclose             \tex_mathclose:D
\name_primitive:NN \mathinner             \tex_mathinner:D
\name_primitive:NN \mathop                \tex_mathop:D
\name_primitive:NN \displaylimits         \tex_displaylimits:D
\name_primitive:NN \limits                \tex_limits:D
\name_primitive:NN \nolimits              \tex_nolimits:D
\name_primitive:NN \mathopen              \tex_mathopen:D
\name_primitive:NN \mathord               \tex_mathord:D
\name_primitive:NN \mathpunct             \tex_mathpunct:D
\name_primitive:NN \mathrel               \tex_mathrel:D
\name_primitive:NN \overline              \tex_overline:D
\name_primitive:NN \underline             \tex_underline:D
\name_primitive:NN \left                  \tex_left:D
\name_primitive:NN \right                 \tex_right:D
\name_primitive:NN \binoppenalty          \tex_binoppenalty:D
\name_primitive:NN \relpenalty            \tex_relpenalty:D
\name_primitive:NN \delimitershortfall    \tex_delimitershortfall:D
\name_primitive:NN \delimiterfactor       \tex_delimiterfactor:D
\name_primitive:NN \nulldelimiterspace    \tex_nulldelimiterspace:D
\name_primitive:NN \everymath             \tex_everymath:D
\name_primitive:NN \mathsurround          \tex_mathsurround:D
\name_primitive:NN \medmuskip             \tex_medmuskip:D
\name_primitive:NN \thinmuskip            \tex_thinmuskip:D
\name_primitive:NN \thickmuskip           \tex_thickmuskip:D
\name_primitive:NN \scriptspace           \tex_scriptspace:D
\name_primitive:NN \noboundary            \tex_noboundary:D
\name_primitive:NN \accent                \tex_accent:D
\name_primitive:NN \char                  \tex_char:D
\name_primitive:NN \discretionary         \tex_discretionary:D
\name_primitive:NN \hfil                  \tex_hfil:D
\name_primitive:NN \hfilneg               \tex_hfilneg:D
\name_primitive:NN \hfill                 \tex_hfill:D
\name_primitive:NN \hskip                 \tex_hskip:D
\name_primitive:NN \hss                   \tex_hss:D
\name_primitive:NN \vfil                  \tex_vfil:D
\name_primitive:NN \vfilneg               \tex_vfilneg:D
\name_primitive:NN \vfill                 \tex_vfill:D
\name_primitive:NN \vskip                 \tex_vskip:D
\name_primitive:NN \vss                   \tex_vss:D
\name_primitive:NN \unskip                \tex_unskip:D
\name_primitive:NN \kern                  \tex_kern:D
\name_primitive:NN \unkern                \tex_unkern:D
\name_primitive:NN \hrule                 \tex_hrule:D
\name_primitive:NN \vrule                 \tex_vrule:D
\name_primitive:NN \leaders               \tex_leaders:D
\name_primitive:NN \cleaders              \tex_cleaders:D
\name_primitive:NN \xleaders              \tex_xleaders:D
\name_primitive:NN \lastkern              \tex_lastkern:D
\name_primitive:NN \lastskip              \tex_lastskip:D
\name_primitive:NN \indent                \tex_indent:D
\name_primitive:NN \par                   \tex_par:D
\name_primitive:NN \noindent              \tex_noindent:D
\name_primitive:NN \vadjust               \tex_vadjust:D
\name_primitive:NN \baselineskip          \tex_baselineskip:D
\name_primitive:NN \lineskip              \tex_lineskip:D
\name_primitive:NN \lineskiplimit         \tex_lineskiplimit:D
\name_primitive:NN \clubpenalty           \tex_clubpenalty:D
\name_primitive:NN \widowpenalty          \tex_widowpenalty:D
\name_primitive:NN \exhyphenpenalty       \tex_exhyphenpenalty:D
\name_primitive:NN \hyphenpenalty         \tex_hyphenpenalty:D
\name_primitive:NN \linepenalty           \tex_linepenalty:D
\name_primitive:NN \doublehyphendemerits  \tex_doublehyphendemerits:D
\name_primitive:NN \finalhyphendemerits   \tex_finalhyphendemerits:D
\name_primitive:NN \adjdemerits           \tex_adjdemerits:D
\name_primitive:NN \hangafter             \tex_hangafter:D
\name_primitive:NN \hangindent            \tex_hangindent:D
\name_primitive:NN \parshape              \tex_parshape:D
\name_primitive:NN \hsize                 \tex_hsize:D
\name_primitive:NN \lefthyphenmin         \tex_lefthyphenmin:D
\name_primitive:NN \righthyphenmin        \tex_righthyphenmin:D
\name_primitive:NN \leftskip              \tex_leftskip:D
\name_primitive:NN \rightskip             \tex_rightskip:D
\name_primitive:NN \looseness             \tex_looseness:D
\name_primitive:NN \parskip               \tex_parskip:D
\name_primitive:NN \parindent             \tex_parindent:D
\name_primitive:NN \uchyph                \tex_uchyph:D
\name_primitive:NN \emergencystretch      \tex_emergencystretch:D
\name_primitive:NN \pretolerance          \tex_pretolerance:D
\name_primitive:NN \tolerance             \tex_tolerance:D
\name_primitive:NN \spaceskip             \tex_spaceskip:D
\name_primitive:NN \xspaceskip            \tex_xspaceskip:D
\name_primitive:NN \parfillskip           \tex_parfillskip:D
\name_primitive:NN \everypar              \tex_everypar:D
\name_primitive:NN \prevgraf              \tex_prevgraf:D
\name_primitive:NN \spacefactor           \tex_spacefactor:D
\name_primitive:NN \shipout               \tex_shipout:D
\name_primitive:NN \vsize                 \tex_vsize:D
\name_primitive:NN \interlinepenalty      \tex_interlinepenalty:D
\name_primitive:NN \brokenpenalty         \tex_brokenpenalty:D
\name_primitive:NN \topskip               \tex_topskip:D
\name_primitive:NN \maxdeadcycles         \tex_maxdeadcycles:D
\name_primitive:NN \maxdepth              \tex_maxdepth:D
\name_primitive:NN \output                \tex_output:D
\name_primitive:NN \deadcycles            \tex_deadcycles:D
\name_primitive:NN \pagedepth             \tex_pagedepth:D
\name_primitive:NN \pagestretch           \tex_pagestretch:D
\name_primitive:NN \pagefilstretch        \tex_pagefilstretch:D
\name_primitive:NN \pagefillstretch       \tex_pagefillstretch:D
\name_primitive:NN \pagefilllstretch      \tex_pagefilllstretch:D
\name_primitive:NN \pageshrink            \tex_pageshrink:D
\name_primitive:NN \pagegoal              \tex_pagegoal:D
\name_primitive:NN \pagetotal             \tex_pagetotal:D
\name_primitive:NN \outputpenalty         \tex_outputpenalty:D
\name_primitive:NN \hoffset               \tex_hoffset:D
\name_primitive:NN \voffset               \tex_voffset:D
\name_primitive:NN \insert                \tex_insert:D
\name_primitive:NN \holdinginserts        \tex_holdinginserts:D
\name_primitive:NN \floatingpenalty       \tex_floatingpenalty:D
\name_primitive:NN \insertpenalties       \tex_insertpenalties:D
\name_primitive:NN \lower                 \tex_lower:D
\name_primitive:NN \moveleft              \tex_moveleft:D
\name_primitive:NN \moveright             \tex_moveright:D
\name_primitive:NN \raise                 \tex_raise:D
\name_primitive:NN \copy                  \tex_copy:D
\name_primitive:NN \lastbox               \tex_lastbox:D
\name_primitive:NN \vsplit                \tex_vsplit:D
\name_primitive:NN \unhbox                \tex_unhbox:D
\name_primitive:NN \unhcopy               \tex_unhcopy:D
\name_primitive:NN \unvbox                \tex_unvbox:D
\name_primitive:NN \unvcopy               \tex_unvcopy:D
\name_primitive:NN \setbox                \tex_setbox:D
\name_primitive:NN \hbox                  \tex_hbox:D
\name_primitive:NN \vbox                  \tex_vbox:D
\name_primitive:NN \vtop                  \tex_vtop:D
\name_primitive:NN \prevdepth             \tex_prevdepth:D
\name_primitive:NN \badness               \tex_badness:D
\name_primitive:NN \hbadness              \tex_hbadness:D
\name_primitive:NN \vbadness              \tex_vbadness:D
\name_primitive:NN \hfuzz                 \tex_hfuzz:D
\name_primitive:NN \vfuzz                 \tex_vfuzz:D
\name_primitive:NN \overfullrule          \tex_overfullrule:D
\name_primitive:NN \boxmaxdepth           \tex_boxmaxdepth:D
\name_primitive:NN \splitmaxdepth         \tex_splitmaxdepth:D
\name_primitive:NN \splittopskip          \tex_splittopskip:D
\name_primitive:NN \everyhbox             \tex_everyhbox:D
\name_primitive:NN \everyvbox             \tex_everyvbox:D
\name_primitive:NN \nullfont              \tex_nullfont:D
\name_primitive:NN \textfont              \tex_textfont:D
\name_primitive:NN \scriptfont            \tex_scriptfont:D
\name_primitive:NN \scriptscriptfont      \tex_scriptscriptfont:D
\name_primitive:NN \fontdimen             \tex_fontdimen:D
\name_primitive:NN \hyphenchar            \tex_hyphenchar:D
\name_primitive:NN \skewchar              \tex_skewchar:D
\name_primitive:NN \defaulthyphenchar     \tex_defaulthyphenchar:D
\name_primitive:NN \defaultskewchar       \tex_defaultskewchar:D
\name_primitive:NN \number                \tex_number:D
\name_primitive:NN \romannumeral          \tex_romannumeral:D
\name_primitive:NN \string                \tex_string:D
\name_primitive:NN \lowercase             \tex_lowercase:D
\name_primitive:NN \uppercase             \tex_uppercase:D
\name_primitive:NN \meaning               \tex_meaning:D
\name_primitive:NN \penalty               \tex_penalty:D
\name_primitive:NN \unpenalty             \tex_unpenalty:D
\name_primitive:NN \lastpenalty           \tex_lastpenalty:D
\name_primitive:NN \special               \tex_special:D
\name_primitive:NN \dump                  \tex_dump:D
\name_primitive:NN \patterns              \tex_patterns:D
\name_primitive:NN \hyphenation           \tex_hyphenation:D
\name_primitive:NN \time                  \tex_time:D
\name_primitive:NN \day                   \tex_day:D
\name_primitive:NN \month                 \tex_month:D
\name_primitive:NN \year                  \tex_year:D
\name_primitive:NN \jobname               \tex_jobname:D
\name_primitive:NN \everyjob              \tex_everyjob:D
\name_primitive:NN \count                 \tex_count:D
\name_primitive:NN \dimen                 \tex_dimen:D
\name_primitive:NN \skip                  \tex_skip:D
\name_primitive:NN \toks                  \tex_toks:D
\name_primitive:NN \muskip                \tex_muskip:D
\name_primitive:NN \box                   \tex_box:D
\name_primitive:NN \wd                    \tex_wd:D
\name_primitive:NN \ht                    \tex_ht:D
\name_primitive:NN \dp                    \tex_dp:D
\name_primitive:NN \catcode               \tex_catcode:D
\name_primitive:NN \delcode               \tex_delcode:D
\name_primitive:NN \sfcode                \tex_sfcode:D
\name_primitive:NN \lccode                \tex_lccode:D
\name_primitive:NN \uccode                \tex_uccode:D
\name_primitive:NN \mathcode              \tex_mathcode:D
%    \end{macrocode}
%
%
%
%
% Since \LaTeX3 will require at least the \eTeX{} extensions,
% we also rename the additional primitives. These are all
% given the prefix |\etex_|.
%    \begin{macrocode}
\name_primitive:NN \ifdefined             \etex_ifdefined:D
\name_primitive:NN \ifcsname              \etex_ifcsname:D
\name_primitive:NN \unless                \etex_unless:D
\name_primitive:NN \eTeXversion           \etex_eTeXversion:D
\name_primitive:NN \eTeXrevision          \etex_eTeXrevision:D
\name_primitive:NN \marks                 \etex_marks:D
\name_primitive:NN \topmarks              \etex_topmarks:D
\name_primitive:NN \firstmarks            \etex_firstmarks:D
\name_primitive:NN \botmarks              \etex_botmarks:D
\name_primitive:NN \splitfirstmarks       \etex_splitfirstmarks:D
\name_primitive:NN \splitbotmarks         \etex_splitbotmarks:D
\name_primitive:NN \unexpanded            \etex_unexpanded:D
\name_primitive:NN \detokenize            \etex_detokenize:D
\name_primitive:NN \scantokens            \etex_scantokens:D
\name_primitive:NN \showtokens            \etex_showtokens:D
\name_primitive:NN \readline              \etex_readline:D
\name_primitive:NN \tracingassigns        \etex_tracingassigns:D
\name_primitive:NN \tracingscantokens     \etex_tracingscantokens:D
\name_primitive:NN \tracingnesting        \etex_tracingnesting:D
\name_primitive:NN \tracingifs            \etex_tracingifs:D
\name_primitive:NN \currentiflevel        \etex_currentiflevel:D
\name_primitive:NN \currentifbranch       \etex_currentifbranch:D
\name_primitive:NN \currentiftype         \etex_currentiftype:D
\name_primitive:NN \tracinggroups         \etex_tracinggroups:D
\name_primitive:NN \currentgrouplevel     \etex_currentgrouplevel:D
\name_primitive:NN \currentgrouptype      \etex_currentgrouptype:D
\name_primitive:NN \showgroups            \etex_showgroups:D
\name_primitive:NN \showifs               \etex_showifs:D
\name_primitive:NN \interactionmode       \etex_interactionmode:D
\name_primitive:NN \lastnodetype          \etex_lastnodetype:D
\name_primitive:NN \iffontchar            \etex_iffontchar:D
\name_primitive:NN \fontcharht            \etex_fontcharht:D
\name_primitive:NN \fontchardp            \etex_fontchardp:D
\name_primitive:NN \fontcharwd            \etex_fontcharwd:D
\name_primitive:NN \fontcharic            \etex_fontcharic:D
\name_primitive:NN \parshapeindent        \etex_parshapeindent:D
\name_primitive:NN \parshapelength        \etex_parshapelength:D
\name_primitive:NN \parshapedimen         \etex_parshapedimen:D
\name_primitive:NN \numexpr               \etex_numexpr:D
\name_primitive:NN \dimexpr               \etex_dimexpr:D
\name_primitive:NN \glueexpr              \etex_glueexpr:D
\name_primitive:NN \muexpr                \etex_muexpr:D
\name_primitive:NN \gluestretch           \etex_gluestretch:D
\name_primitive:NN \glueshrink            \etex_glueshrink:D
\name_primitive:NN \gluestretchorder      \etex_gluestretchorder:D
\name_primitive:NN \glueshrinkorder       \etex_glueshrinkorder:D
\name_primitive:NN \gluetomu              \etex_gluetomu:D
\name_primitive:NN \mutoglue              \etex_mutoglue:D
\name_primitive:NN \lastlinefit           \etex_lastlinefit:D
\name_primitive:NN \interlinepenalties    \etex_interlinepenalties:D
\name_primitive:NN \clubpenalties         \etex_clubpenalties:D
\name_primitive:NN \widowpenalties        \etex_widowpenalties:D
\name_primitive:NN \displaywidowpenalties \etex_displaywidowpenalties:D
\name_primitive:NN \middle                \etex_middle:D
\name_primitive:NN \savinghyphcodes       \etex_savinghyphcodes:D
\name_primitive:NN \savingvdiscards       \etex_savingvdiscards:D
\name_primitive:NN \pagediscards          \etex_pagediscards:D
\name_primitive:NN \splitdiscards         \etex_splitdiscards:D
\name_primitive:NN \TeXXETstate           \etex_TeXXETstate:D
\name_primitive:NN \beginL                \etex_beginL:D
\name_primitive:NN \endL                  \etex_endL:D
\name_primitive:NN \beginR                \etex_beginR:D
\name_primitive:NN \endR                  \etex_endR:D
\name_primitive:NN \predisplaydirection   \etex_predisplaydirection:D
\name_primitive:NN \everyeof              \etex_everyeof:D
\name_primitive:NN \protected             \etex_protected:D
%    \end{macrocode}
%
%
%    All major distributions\footnote{At the time of writing MiK\TeX\
%      does not but I have a gut feeling that will change.} use
%    pdf\eTeX{} as engine so we add these names as well. Since the
%    pdf\TeX{} team has been very good at prefixing most primitives
%    with |pdf| (so far only five do not start with |pdf|) we do not
%    give then a double |pdf| prefix. The list below covers pdf\TeX
%    v~1.30.4.
%    \begin{macrocode}
%% integer registers:
\name_primitive:NN \pdfoutput             \pdf_output:D
\name_primitive:NN \pdfminorversion       \pdf_minorversion:D
\name_primitive:NN \pdfcompresslevel      \pdf_compresslevel:D
\name_primitive:NN \pdfdecimaldigits      \pdf_decimaldigits:D
\name_primitive:NN \pdfimageresolution    \pdf_imageresolution:D
\name_primitive:NN \pdfpkresolution       \pdf_pkresolution:D
\name_primitive:NN \pdftracingfonts       \pdf_tracingfonts:D
\name_primitive:NN \pdfuniqueresname      \pdf_uniqueresname:D
\name_primitive:NN \pdfadjustspacing      \pdf_adjustspacing:D
\name_primitive:NN \pdfprotrudechars      \pdf_protrudechars:D
\name_primitive:NN \efcode                \pdf_efcode:D
\name_primitive:NN \lpcode                \pdf_lpcode:D
\name_primitive:NN \rpcode                \pdf_rpcode:D
\name_primitive:NN \pdfforcepagebox       \pdf_forcepagebox:D
\name_primitive:NN \pdfoptionalwaysusepdfpagebox \pdf_optionalwaysusepdfpagebox:D
\name_primitive:NN \pdfinclusionerrorlevel\pdf_inclusionerrorlevel:D
\name_primitive:NN \pdfoptionpdfinclusionerrorlevel \pdf_optionpdfinclusionerrorlevel:D
\name_primitive:NN \pdfimagehicolor       \pdf_imagehicolor:D
\name_primitive:NN \pdfimageapplygamma    \pdf_imageapplygamma:D
\name_primitive:NN \pdfgamma              \pdf_gamma:D
\name_primitive:NN \pdfimagegamma         \pdf_imagegamma:D
%% dimen registers:
\name_primitive:NN \pdfhorigin            \pdf_horigin:D
\name_primitive:NN \pdfvorigin            \pdf_vorigin:D
\name_primitive:NN \pdfpagewidth          \pdf_pagewidth:D
\name_primitive:NN \pdfpageheight         \pdf_pageheight:D
\name_primitive:NN \pdflinkmargin         \pdf_linkmargin:D
\name_primitive:NN \pdfdestmargin         \pdf_destmargin:D
\name_primitive:NN \pdfthreadmargin       \pdf_threadmargin:D
%% token registers:
\name_primitive:NN \pdfpagesattr          \pdf_pagesattr:D
\name_primitive:NN \pdfpageattr           \pdf_pageattr:D
\name_primitive:NN \pdfpageresources      \pdf_pageresources:D
\name_primitive:NN \pdfpkmode             \pdf_pkmode:D
%% expandable commands:
\name_primitive:NN \pdftexrevision        \pdf_texrevision:D
\name_primitive:NN \pdftexbanner          \pdf_texbanner:D
\name_primitive:NN \pdfcreationdate       \pdf_creationdate:D
\name_primitive:NN \pdfpageref            \pdf_pageref:D
\name_primitive:NN \pdfxformname          \pdf_xformname:D
\name_primitive:NN \pdffontname           \pdf_fontname:D
\name_primitive:NN \pdffontobjnum         \pdf_fontobjnum:D
\name_primitive:NN \pdffontsize           \pdf_fontsize:D
\name_primitive:NN \pdfincludechars       \pdf_includechars:D
\name_primitive:NN \leftmarginkern        \pdf_leftmarginkern:D
\name_primitive:NN \rightmarginkern       \pdf_rightmarginkern:D
\name_primitive:NN \pdfescapestring       \pdf_escapestring:D
\name_primitive:NN \pdfescapename         \pdf_escapename:D
\name_primitive:NN \pdfescapehex          \pdf_escapehex:D
\name_primitive:NN \pdfunescapehex        \pdf_unescapehex:D
\name_primitive:NN \pdfstrcmp             \pdf_strcmp:D
\name_primitive:NN \pdfuniformdeviate     \pdf_uniformdeviate:D
\name_primitive:NN \pdfnormaldeviate      \pdf_normaldeviate:D
\name_primitive:NN \pdfmdfivesum          \pdf_mdfivesum:D
\name_primitive:NN \pdffilemoddate        \pdf_filemoddate:D
\name_primitive:NN \pdffilesize           \pdf_filesize:D
\name_primitive:NN \pdffiledump           \pdf_filedump:D
%% read-only integers:
\name_primitive:NN \pdftexversion         \pdf_texversion:D
\name_primitive:NN \pdflastobj            \pdf_lastobj:D
\name_primitive:NN \pdflastxform          \pdf_lastxform:D
\name_primitive:NN \pdflastximage         \pdf_lastximage:D
\name_primitive:NN \pdflastximagepages    \pdf_lastximagepages:D
\name_primitive:NN \pdflastannot          \pdf_lastannot:D
\name_primitive:NN \pdflastxpos           \pdf_lastxpos:D
\name_primitive:NN \pdflastypos           \pdf_lastypos:D
\name_primitive:NN \pdflastdemerits       \pdf_lastdemerits:D
\name_primitive:NN \pdfelapsedtime        \pdf_elapsedtime:D
\name_primitive:NN \pdfrandomseed         \pdf_randomseed:D
\name_primitive:NN \pdfshellescape        \pdf_shellescape:D
%% general commands:
\name_primitive:NN \pdfobj                \pdf_obj:D 
\name_primitive:NN \pdfrefobj             \pdf_refobj:D 
\name_primitive:NN \pdfxform              \pdf_xform:D
\name_primitive:NN \pdfrefxform           \pdf_refxform:D  
\name_primitive:NN \pdfximage             \pdf_ximage:D
\name_primitive:NN \pdfrefximage          \pdf_refximage:D
\name_primitive:NN \pdfannot              \pdf_annot:D
\name_primitive:NN \pdfstartlink          \pdf_startlink:D    
\name_primitive:NN \pdfendlink            \pdf_endlink:D              
\name_primitive:NN \pdfoutline            \pdf_outline:D  
\name_primitive:NN \pdfdest               \pdf_dest:D
\name_primitive:NN \pdfthread             \pdf_thread:D
\name_primitive:NN \pdfstartthread        \pdf_startthread:D      
\name_primitive:NN \pdfendthread          \pdf_endthread:D      
\name_primitive:NN \pdfsavepos            \pdf_savepos:D      
\name_primitive:NN \pdfinfo               \pdf_info:D 
\name_primitive:NN \pdfcatalog            \pdf_catalog:D  
\name_primitive:NN \pdfnames              \pdf_names:D
\name_primitive:NN \pdfmapfile            \pdf_mapfile:D  
\name_primitive:NN \pdfmapline            \pdf_mapline:D  
\name_primitive:NN \pdffontattr           \pdf_fontattr:D   
\name_primitive:NN \pdftrailer            \pdf_trailer:D  
\name_primitive:NN \pdffontexpand         \pdf_fontexpand:D
%%\name_primitive:NN \vadjust [<pre spec>] <filler> { <vertical mode material> } (h, m)
\name_primitive:NN \pdfliteral            \pdf_literal:D
%%\name_primitive:NN \special <pdfspecial spec>
\name_primitive:NN \pdfresettimer         \pdf_resettimer:D    
\name_primitive:NN \pdfsetrandomseed      \pdf_setrandomseed:D        
\name_primitive:NN \pdfnoligatures        \pdf_noligatures:D      
%    \end{macrocode}
%
% What about Omega and Aleph? The status of both are unclear but let's
% start by adding a single primitive which we can use for testing if
% we have one of these engines.
%    \begin{macrocode}
\name_primitive:NN \textdir             \aleph_textdir:D
%    \end{macrocode}
%  \begin{macro}{\CodeStart}
%  \begin{macro}{\CodeStop}
%    Here we define functions that are used to turn on and off the
%    special conventions used in the kernel of \LaTeX3.
%
%    First of all, the space, tab and the return characters will all
%    be ignored inside \LaTeX3 code, the latter because endline is set
%    to a space instead. When space characters are needed in \LaTeX3
%    code the |~| character will be used for that purpose.
%
%    \begin{macrocode}
\tex_def:D\ExplSyntaxOn{
  \tex_def:D\ExplSyntaxStatus{00}
  \tex_catcode:D  126=10 \tex_relax:D % tilde is a space char.
  \tex_catcode:D   32=9  \tex_relax:D % space is ignored
  \tex_catcode:D    9=9  \tex_relax:D % tab also ignored
  \tex_endlinechar:D =32 \tex_relax:D % endline is space
  \tex_catcode:D   95=11 \tex_relax:D % underscore letter
  \tex_catcode:D   58=11 \tex_relax:D % colon letter
}
%    \end{macrocode}
%
%    \begin{macrocode}
\tex_def:D\ExplSyntaxOff{
  \tex_def:D\ExplSyntaxStatus{01}
  \tex_catcode:D  126=13 \tex_relax:D 
  \tex_catcode:D   32=10 \tex_relax:D 
  \tex_catcode:D    9=10 \tex_relax:D 
  \tex_endlinechar:D =13 \tex_relax:D 
  \tex_catcode:D   95=8  \tex_relax:D 
  \tex_catcode:D   58=12 \tex_relax:D 
}
%    \end{macrocode}
% Temporary while names change.
%    \begin{macrocode}
\tex_let:D \CodeStart \ExplSyntaxOn
\tex_let:D \CodeStop \ExplSyntaxOff
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
%  \begin{macro}{\NamesStart}
%  \begin{macro}{\NamesStop}
%    Sometimes we need to be able to use names from the kernel of
%    \LaTeX3 without adhering it's conventions according to space
%    characters. These macros provide the necessary settings.
%    \begin{macrocode}
\tex_def:D \NamesStart{
  \tex_catcode:D `\_=11\tex_relax:D
  \tex_catcode:D `\:=11\tex_relax:D
}
\tex_def:D \NamesStop{
  \tex_catcode:D `\_=8\tex_relax:D
  \tex_catcode:D `\:=12\tex_relax:D
}
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
% \begin{macro}{\GetIdInfo}
% \begin{macro}{\GetIdInfoAuxi:w}
% \begin{macro}{\GetIdInfoAuxii:w}
% \begin{macro}{\GetIdInfoAuxCVS:w}
% \begin{macro}{\GetIdInfoAuxSVN:w}
%   Extract all information from a cvs or svn field. The
%   formats are slightly different but at least the information is in
%   the same positions so we check in the date format so see if it
%   contains a "/" after the four-digit year. If it does it is cvs
%   else svn and we extract information. To be on the safe side we
%   ensure that spaces in the argument are seen.
%    \begin{macrocode}
\tex_def:D\GetIdInfo{
  \tex_begingroup:D
  \tex_catcode:D   32=10 \tex_relax:D % needed? Probably for now.
  \GetIdInfoAuxi:w
}
\tex_def:D\GetIdInfoAuxi:w$#1~#2.#3~#4~#5~#6~#7~#8$#9{
  \tex_endgroup:D
  \tex_def:D\filename{#2}
  \tex_def:D\fileversion{#4}
  \tex_def:D\filedescription{#9}
  \tex_def:D\fileauthor{#7}
  \GetIdInfoAuxii:w #5\tex_relax:D
  #3\tex_relax:D#5\tex_relax:D#6\tex_relax:D
}
\tex_def:D\GetIdInfoAuxii:w #1#2#3#4#5#6\tex_relax:D{
  \tex_ifx:D#5/
    \tex_expandafter:D\GetIdInfoAuxCVS:w
  \tex_else:D
    \tex_expandafter:D\GetIdInfoAuxSVN:w
  \tex_fi:D
}
\tex_def:D\GetIdInfoAuxCVS:w #1,v\tex_relax:D
                             #2\tex_relax:D#3\tex_relax:D{
  \tex_def:D\filedate{#2}
  \tex_def:D\filenameext{#1}
  \tex_def:D\filetimestamp{#3}
%    \end{macrocode}
% When creating the format we want the information in the log straight
% away.
%    \begin{macrocode}
%<initex>\tex_immediate:D\tex_write:D-1
%<initex>  {\filename;~ v\fileversion,~\filedate;~\filedescription}
}
\tex_def:D\GetIdInfoAuxSVN:w #1\tex_relax:D#2-#3-#4
                             \tex_relax:D#5Z\tex_relax:D{
  \tex_def:D\filenameext{#1}
  \tex_def:D\filedate{#2/#3/#4}
  \tex_def:D\filetimestamp{#5}
%<-package>\tex_immediate:D\tex_write:D-1
%<-package>  {\filename;~ v\fileversion,~\filedate;~\filedescription}
}
%</initex|package>
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
% Finally some corrections in the case we are running over \LaTeXe.
%
%
%
% We want to set things up so that experimental packages and regular
% packages can coexist with the former using the \LaTeX3 programming
% catcode settings.  Since it cannot be the task of the end user to
% know how a package is constructed under the hood we make it so that
% the experimental packages have to identify themselves. As an example
% it can be done as
% \begin{verbatim}
% \RequirePackage{l3names}
% \ProvidesExplPackage{agent}{2007/08/28}{007}{bonding module}
% \end{verbatim}
% or by using the "\file"\meta{field} informations from "\GetIdInfo"
% as the packages in this distribution do like this:
% \begin{verbatim}
% \RequirePackage{l3names}
% \GetIdInfo$Id: l3names.dtx 621 2007-09-01 20:14:19Z morten $
%          {L3 Experimental Box module}
% \ProvidesExplPackage
%   {\filename}{\filedate}{\fileversion}{\filedescription}
% \end{verbatim}
%
%
% \begin{macro}{\ProvidesExplPackage}
% \begin{macro}{\ProvidesExplClass}
% First up is the identification. Rather trivial
%    \begin{macrocode}
%<*package>
\tex_def:D \ProvidesExplPackage#1#2#3#4{
  \ProvidesPackage{#1}[#2~v#3~#4]
  \ExplSyntaxOn
}
\tex_def:D \ProvidesExplClass#1#2#3#4{
  \ProvidesClass{#1}[#2~v#3~#4]
  \ExplSyntaxOn
}
%    \end{macrocode} 
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\org@onefilewithoptions}
% \begin{macro}{\@onefilewithoptions}
% \begin{macro}{\@popfilename}
%   The idea behind the code is to record whether or not the \LaTeX3
%   syntax is on or off when about to load a file with class or
%   package extension. This status stored in the parameter
%   |\ExplSyntaxStatus| and set by |\ExplSyntaxOn| and
%   |\ExplSyntaxOff| to |00| and |01| respectively is puched onto the
%   stack |\ExplSyntaxStack|. Then the catcodes are set back to
%   normal, the file loaded with its options and finally the stack is
%   popped again.
%
%   |\@popfilename| is appended with a preamble check. If the catcode
%   of "@" is being reset it is a fair assumption that we are back in
%   the usual preamble and so we switch off our syntax as well.
%    \begin{macrocode}
\tex_let:D \org@onefilewithoptions\@onefilewithoptions
\tex_def:D \@onefilewithoptions#1[#2][#3]#4{
  \tex_edef:D \ExplSyntaxStack{ \ExplSyntaxStatus\ExplSyntaxStack }
  \ExplSyntaxOff
  \org@onefilewithoptions{#1}[{#2}][{#3}]{#4}
  \tex_expandafter:D\ExplSyntaxPopStack\ExplSyntaxStack\tex_relax:D
}
\g@addto@macro\@popfilename{%
  \tex_ifnum:D\tex_the:D\tex_catcode:D`\@=12\tex_relax:D
    \ExplSyntaxOff
  \tex_fi:D
}
%    \end{macrocode} 
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\ExplSyntaxPopStack}
% \begin{macro}{\ExplSyntaxStack}
%   Popping the stack is simple: Take the first two tokens which are
%   either the sequence "00" or "01" and use them in an if test. The
%   stack is initially empty.
%    \begin{macrocode}
\tex_def:D\ExplSyntaxPopStack#1#2#3\tex_relax:D{
  \tex_def:D\ExplSyntaxStack{#3}
  \tex_if:D#1#2
    \ExplSyntaxOn
  \tex_else:D
    \ExplSyntaxOff
  \tex_fi:D
}
\tex_def:D\ExplSyntaxStack{}
%    \end{macrocode} 
% \end{macro}
% \end{macro}
%
%
% A few of the `primitives' assigned above have already been stolen
% by \LaTeX, so assign them by hand to the saved real primitive.
%    \begin{macrocode}
\tex_let:D\tex_input:D        \@@input
\tex_let:D\tex_underline:D    \@@underline
\tex_let:D\tex_end:D          \@@end
\tex_let:D\tex_everymath:D    \frozen@everymath
\tex_let:D\tex_everydisplay:D \frozen@everydisplay
\tex_let:D\tex_italiccor:D    \@@italiccorr
\tex_let:D\tex_hyphen:D       \@@hyph
%    \end{macrocode}
%
% \TeX\ has a nasty habit of inserting a command with the name |\par|
% so we had better make sure that that command at least has a definition.
%    \begin{macrocode}
\tex_let:D\par          \tex_par:D
%    \end{macrocode}
%
%
%
%    \begin{macrocode}
\tex_ifx:D\name_undefine:N\@gobble
%    \end{macrocode}
%
%    \begin{macrocode}
  \AtEndOfPackage{\ExplSyntaxOff}
  \tex_def:D\name_pop_stack:w{}
%    \end{macrocode}
%
%    \begin{macrocode}
\tex_else:D
%    \end{macrocode}
%
% But if traditional \TeX\ code is disabled, do this\ldots
%
% As mentioned above, The \LaTeXe\ package mechanism will insert some code
% to handle the filename stack, and reset the package options, this
% code will die if the \TeX\ primitives have gone, so skip past it
% and insert some equivalent code that will work.
%
% First a version of |\ProvidesPackage| that can cope.
%    \begin{macrocode}
\tex_def:D\ProvidesPackage{
  \tex_begingroup:D
  \ExplSyntaxOff
  \package_provides:w}
%    \end{macrocode}
%
%    \begin{macrocode}
\tex_def:D\package_provides:w#1#2[#3]{
  \tex_endgroup:D
  \tex_immediate:D\tex_write:D-1{Package:~#1#2~#3}
  \tex_expandafter:D\tex_xdef:D
    \tex_csname:D ver@#1.sty\tex_endcsname:D{#1}}
%    \end{macrocode}
%
% In this case the catcode preserving stack is not maintained and
% |\CodeStart| conventions stay in force once on. You'll need
% to turn then off explicitly with |\CodeStop| (although as currently
% built on 2e, nothing except very experimental code will run in
% this mode!) Also note that |\RequirePackage| is a simple definition, just for
% one file, with no options.
%    \begin{macrocode}
\tex_def:D\name_pop_stack:w#1\relax{%
  \ExplSyntaxOff
  \tex_expandafter:D\@p@pfilename\@currnamestack\@nil
  \tex_let:D\default@ds\@unknownoptionerror
  \tex_global:D\tex_let:D\ds@\@empty
  \tex_global:D\tex_let:D\@declaredoptions\@empty}
%    \end{macrocode}
%
%    \begin{macrocode}
\tex_def:D\@p@pfilename#1#2#3#4\@nil{%
  \tex_gdef:D\@currname{#1}%
  \tex_gdef:D\@currext{#2}%
  \tex_catcode:D`\@#3%
  \tex_gdef:D\@currnamestack{#4}}
%    \end{macrocode}
%
%    \begin{macrocode}
  \tex_def:D\NeedsTeXFormat#1{}
  \tex_def:D\RequirePackage#1{
    \tex_expandafter:D\tex_ifx:D
      \tex_csname:D ver@#1.sty\tex_endcsname:D\tex_relax:D
        \ExplSyntaxOn
        \tex_input:D#1.sty\tex_relax:D
    \tex_fi:D}
\tex_fi:D
%    \end{macrocode}
%
%
% The |\futurelet| just forces the special end of file marker to vanish,
% so the argument of |\name_pop_stack:w| does not cause an end-of-file
% error. (Normally I use |\expandafter| for this trick, but here the next
% token is in fact |\let| and that may be undefined.)
%    \begin{macrocode}
\tex_futurelet:D\name_tmp:\name_pop_stack:w
%</package>
%    \end{macrocode}
%
% \endinput
%
%  $Log$
%  Revision 1.17  2006/01/15 07:55:48  morten
%  Fixed minor typo
%
%  Revision 1.16  2006/01/15 07:17:43  morten
%  Imported \NamesStart and \NamesStop from l3messages.
%
%  Revision 1.15  2005/12/27 10:00:03  morten
%  Changed RCS information retrieval, code to run as package under 2e
%  changed slightly to not set special catcodes directly.
%
%  Revision 1.14  2005/12/01 22:58:16  morten
%  Added pdfTeX primitives
%
%  Revision 1.13  2005/03/26 21:04:19  morten
%  Fix typo.
%
%  Revision 1.12  2005/03/22 23:23:57  morten
%  Added an Aleph primitive
%
%  Revision 1.11  2005/03/15 23:16:21  braams
%  Some tweaking with the docstrip guards to get the documentation to
%  come out right.
%
%  Revision 1.10  2005/03/15 22:48:31  braams
%  Made it possible to load this as the very first file with initex
%
%  Revision 1.9  2005/03/11 21:29:56  braams
%  Fixed the use of RCS information; moved definition of \eTeX
%  to l3doc.cls
%