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
|
%%
%% This is file `luatextra.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% luatextra.dtx (with options: `package')
%%
%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
%%
%% This work is under the CC0 license.
%% See source file 'luatextra.dtx' for details.
%%
\csname ifluatextraloaded\endcsname
\let\ifluatextraloaded\endinput
\bgroup\expandafter\expandafter\expandafter\egroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\expandafter\ifx\csname ifluatex\endcsname\relax
\input ifluatex.sty
\fi
\else
\RequirePackage{ifluatex}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luatextra}
[2010/08/02 v0.971 LuaTeX extra low-level macros]
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax \else
\RequirePackage{metalogo}
\fi
\ifluatex\else
\begingroup
\expandafter\ifx\csname PackageWarningNoLine\endcsname\relax
\def\x#1#2{\begingroup\newlinechar10
\immediate\write16{Package #1 warning: #2}\endgroup}
\else
\let\x\PackageWarningNoLine
\fi
\expandafter\endgroup
\x{luatextra}{LuaTeX is required for this package.^^J
Aborting package loading.}
\expandafter\endinput
\fi
\bgroup\expandafter\expandafter\expandafter\egroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\input luatexbase.sty
\input luatexbase-modutils.sty
\input luatexbase-mcb.sty
\else
\RequirePackage{luatexbase}
\RequirePackage{luatexbase-modutils}
\RequirePackage{luatexbase-mcb}
\fi
\luatexUseModule{lualibs}
\bgroup\expandafter\expandafter\expandafter\egroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax \else
\RequirePackage{environ}
\NewEnviron{luacode}{\directlua{\BODY}}
\fi
\ifnum\luatexversion<36
\def\directlua{\pdfprimitive\directlua0}
\def\latelua{\pdfprimitive\latelua0}
\def\luadirect{\pdfprimitive\directlua0}
\def\lualate{\pdfprimitive\latelua0}
\def\luatexattribute{\attribute}
\def\luatexattributedef{\attributedef}
\def\luatexclearmarks{\pdfprimitive\luaclearmarks}
\def\luatexformatname{\pdfprimitive\formatname}
\def\luatexscantexttokens{\pdfprimitive\scantexttokens}
\def\luatexcatcodetable{\catcodetable}
\def\initluatexcatcodetable{\pdfprimitive\initcatcodetable}
\def\saveluatexcatcodetable{\pdfprimitive\savecatcodetable}
\def\luaclose{\pdfprimitive\closelua}
\else
\directlua{tex.enableprimitives('luatex', {'attribute'})}
\directlua{tex.enableprimitives('luatex', {'attributedef'})}
\directlua{tex.enableprimitives('luatex', {'clearmarks'})}
\directlua{tex.enableprimitives('luatex', {'formatname'})}
\directlua{tex.enableprimitives('luatex', {'scantexttokens'})}
\directlua{tex.enableprimitives('luatex', {'catcodetable'})}
\directlua{tex.enableprimitives('luatex', {'latelua'})}
\directlua{tex.enableprimitives('luatex', {'initcatcodetable'})}
\directlua{tex.enableprimitives('luatex', {'savecatcodetable'})}
\directlua{tex.enableprimitives('luatex', {'closelua'})}
\let\luadirect\directlua
\let\lualate\luatexlatelua
\let\initluatexcatcodetable\luatexinitcatcodetable
\let\saveluatexcatcodetable\luatexsavecatcodetable
\let\luaclose\luatexcloselua
\fi
\directlua{dofile(kpse.find_file("luatextra.lua"))}
\let\newluaattribute\newluatexattribute
\let\luaattribute\luatexattribute
\let\unsetluaattribute\unsetluatexattribute
\let\initluacatcodetable\initluatexcatcodetable
\let\luasetcatcoderange\luatexsetcatcoderange
\let\newluacatcodetable\newluatexcatcodetable
\let\setluaattribute\setluatexattribute
\let\luaModuleError\luatexModuleError
\let\luaRequireModule\luatexRequireModule
\let\luaUseModule\luatexUseModule
\def\ltxtra@RegisterFontCallback{
\directlua{luatextra.register_font_callback()}
}
\bgroup\expandafter\expandafter\expandafter\egroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\input luaotfload.sty
\else
\RequirePackage{luaotfload}
\fi
\endinput
%%
%% End of file `luatextra.sty'.
|