-
Notifications
You must be signed in to change notification settings - Fork 2
/
nodetree.tex
64 lines (64 loc) · 1.64 KB
/
nodetree.tex
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
%%
%% This is file `nodetree.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nodetree.dtx (with options: `tex')
%%
%% This is a generated file.
%%
%% Copyright (C) 2016-2024 by Josef Friedrich <[email protected]>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
%% or (at your option) any later version. The latest version of this
%% license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008/05/05 or later.
%%
\directlua{
nodetree = require('nodetree')
}
\def\NodetreeSetOption[#1]#2{
\directlua{
nodetree.set_option('#1', '#2')
}
}
\let\nodetreeoption\NodetreeSetOption
\def\NodetreeResetOption#1{
\NodetreeSetOption[#1]{%
\directlua{
tex.print(nodetree.get_default_option('#1'))
}%
}%
}
\def\NodetreeReset{
\NodetreeResetOption{callback}
\NodetreeResetOption{channel}
\NodetreeResetOption{color}
\NodetreeResetOption{decimalplaces}
\NodetreeResetOption{unit}
\NodetreeResetOption{verbosity}
}
\let\nodetreereset\NodetreeReset
\def\NodetreeRegisterCallback#1{
\directlua{
nodetree.set_option('callback', '#1')
nodetree.register_callbacks()
}
}
\let\nodetreeregister\NodetreeRegisterCallback
\def\NodetreeUnregisterCallback#1{
\directlua{
nodetree.set_option('callback', '#1')
nodetree.unregister_callbacks()
}
}
\let\nodetreeunregister\NodetreeUnregisterCallback
\endinput
%%
%% End of file `nodetree.tex'.