blob: 43852a72b1d9cdeb20bf00219349e254f0325e5f (
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
|
%%
%% This is file `luatexbase-compat.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% luatexbase-compat.dtx (with options: `texpackage')
%%
%% See the aforementioned source file(s) for copyright and licensing information.
%%
\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
\toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
\edef\x{\endlinechar13}%
\def\y#1 #2 {%
\toks0\expandafter{\the\toks0 \catcode#1 \the\catcode#1}%
\edef\x{\x \catcode#1 #2}}%
\y 13 5 % carriage return
\y 61 12 % =
\y 32 10 % space
\y 123 1 % {
\y 125 2 % }
\y 35 6 % #
\y 64 11 % @ (letter)
\y 10 12 % new line ^^J
\y 39 12 % '
\y 40 12 % (
\y 41 12 % )
\y 42 12 % *
\y 44 12 % ,
\y 45 12 % -
\y 46 12 % .
\y 47 12 % /
\y 58 12 % :
\y 60 12 % <
\y 91 12 % [
\y 93 12 % ]
\y 94 7 % ^
\y 96 12 % `
\toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
\edef\y#1{\noexpand\expandafter\endgroup%
\noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
\noexpand\else \noexpand\expandafter\noexpand\endinput%
\noexpand\fi}%
\expandafter\y\csname luatexbase@compat@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
\else
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
\x{luatexbase-compat}[2011/05/24 v0.4 Compatibility tools for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
\else
\RequirePackage{ifluatex}
\fi
\ifluatex\else
\begingroup
\expandafter\ifx\csname PackageError\endcsname\relax
\def\x#1#2#3{\begingroup \newlinechar10
\errhelp{#3}\errmessage{Package #1 error: #2}\endgroup}
\else
\let\x\PackageError
\fi
\expandafter\endgroup
\x{luatexbase-compat}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
\expandafter\luatexbase@compat@sty@endinput%
\fi
\begingroup
\expandafter\ifx\csname newcommand\endcsname\relax
\toks0{\long\def\luatexbase@directlua}%
\else
\toks0{\newcommand\luatexbase@directlua}%
\fi
\ifnum\luatexversion<36
\toks0\expandafter{\the\toks0{\directlua0}}%
\else
\toks0\expandafter{\the\toks0{\directlua}}%
\fi
\expandafter\endgroup
\the\toks0
\luatexbase@directlua{%
luatexbase = luatexbase or {}
luatexbase.luatexversion = \number\luatexversion\space
luatexbase.luatexrevision = \number\luatexrevision\space}
\begingroup
\expandafter\ifx\csname newcommand\endcsname\relax
\toks0{\def\luatexbase@ensure@primitive#1}
\else
\toks0{\newcommand*\luatexbase@ensure@primitive[1]}
\fi
\toks2{}\def\x#1{\toks2\expandafter{\the\toks2 #1}}
\x{%
\ifcsname luatex#1\endcsname \else}
\ifnum\luatexversion<37\relax
\x{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname #1\endcsname\relax}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname PackageError\endcsname\relax
\x{%
\errmessage{%
Package luatexbase-compat error: failed to enable `#1'.}}
\else
\x{%
\PackageError{luatexbase-compat}{%
Package luatexbase-compat error: failed to enable `#1'.}{}}
\fi
\x{%
\else}
\x{%
\expandafter\let\csname luatex#1\expandafter\endcsname
\csname#1\endcsname
\fi}
\else
\x{%
\luatexbase@directlua{tex.enableprimitives('luatex', {'#1'})}}
\fi
\x{%
\fi}
\toks0\expandafter{\the\toks0\expandafter{\the\toks2}}
\expandafter\endgroup
\the\toks0
\luatexbase@compat@sty@endinput%
\endinput
%%
%% End of file `luatexbase-compat.sty'.
|