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
|
%%
%% This is file `test-mcb-plain.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% luatexbase-mcb.dtx (with options: `testplain')
%%
%% Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
%%
%% This work is under the CC0 license.
%% See source file 'luatexbase-mcb.dtx' for details.
%%
\input luatexbase-mcb.sty
\catcode 64 11
\luatexbase@directlua{
local function one(head,...)
texio.write_nl("I'm number 1")
return head, true
end
local function two(head,...)
texio.write_nl("I'm number 2")
return head, true
end
local function three(head,...)
texio.write_nl("I'm number 3")
return head, true
end
luatexbase.add_to_callback("hpack_filter",one,"my sample function one",1)
luatexbase.add_to_callback("hpack_filter",two,"my sample function two",2)
luatexbase.add_to_callback("hpack_filter",three,"my sample function three",1)
luatexbase.remove_from_callback("hpack_filter","my sample function three")
}
\bye
\endinput
%%
%% End of file `test-mcb-plain.tex'.
|