forked from numere-org/Translation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateTeXDocumentation.nprc
191 lines (171 loc) · 4.92 KB
/
createTeXDocumentation.nprc
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
#***************************************************************************************************
* NUMERE-PROZEDUR: $createTeXDocumentation()
* =================================================================================================
* Hinzugefügt: 2024-01-03, um 12:33:37 *#
##! \procedure createTeXDocumentation
##! Create the PDF documention from the documentation articles using the !!-tex!! export
##! functionality and the XeLaTeX compiler.
procedure $createTeXDocumentation() :: explicit mask
##~ Füge hier deine Kommandos und Ausdrücke ein.
str sOrigLangId = getuilang()
copy "<this>/common/*" -target="<>/lang/" -all
namespace thisfile
## Create German Documentation
$createDocumentationFiles("de-DE");
## Create English documentation
$createDocumentationFiles("en-GB");
## Reset original state
copy "<this>/" + sOrigLangId + "/docs/*" -target="<>/docs/" -all
print "All PDF documentations were created."
return void;
endprocedure
##! \procedure createDocumentationFiles
##! Create the articles and run the XeLaTeX compiler on them.
##!
##! \param _sLangId The language ID
procedure $createDocumentationFiles(_sLangId) :: explicit
print "Creating PDF documentation for " + _sLangId + " files ..."
copy "<this>/" + _sLangId + "/docs/*" -target="<>/docs/" -all
help "abort" -tex
help "about" -tex
help "analyzer" -tex
help "append" -tex
help "audio" -tex
help "chimap" -tex
help "clear" -tex
help "cluster" -tex
help "colors" -tex
help "compose" -tex
help "console" -tex
help "cont" -tex
help "cont3d" -tex
help "coords" -tex
help "data" -tex
help "datagrid" -tex
help "debugger" -tex
help "declare" -tex
help "define" -tex
help "detect" -tex
help "dialog" -tex
help "diff" -tex
help "documentation" -tex
help "draw" -tex
help "draw3d" -tex
help "edit" -tex
help "editor" -tex
help "eval" -tex
help "execute" -tex
help "explorer" -tex
help "expression" -tex
help "extrema" -tex
help "fft" -tex
help "filetree" -tex
help "find" -tex
help "firststeps" -tex
help "fit" -tex
help "functions" -tex
help "fwt" -tex
help "get" -tex
help "grad" -tex
help "grad3d" -tex
help "graphviewer" -tex
help "gridrot" -tex
help "hist" -tex
help "history" -tex
help "implot" -tex
help "include" -tex
help "install" -tex
help "integrate" -tex
help "language" -tex
help "latex" -tex
help "layout" -tex
help "linestyles" -tex
help "list" -tex
help "listbrowser" -tex
help "matfunc" -tex
help "matop" -tex
help "multiresult" -tex
help "new" -tex
help "numere" -tex
help "operator" -tex
help "pack" -tex
help "plot" -tex
help "plot3d" -tex
help "plugin" -tex
help "proccmd" -tex
help "progress" -tex
help "prompt" -tex
help "pso" -tex
help "pulse" -tex
help "quit" -tex
help "random" -tex
help "read" -tex
help "refactoring" -tex
help "regularize" -tex
help "resample" -tex
help "restrict" -tex
help "revision" -tex
help "script" -tex
help "set" -tex
help "show" -tex
help "sort" -tex
help "spline" -tex
help "stats" -tex
help "stfa" -tex
help "string" -tex
help "subplot" -tex
help "symboltree" -tex
help "syntax" -tex
help "table" -tex
help "taylor" -tex
help "ticks" -tex
help "unit" -tex
help "url" -tex
help "variables" -tex
help "vect" -tex
help "vect3d" -tex
help "zeroes" -tex
help "for" -tex
help "flowctrl" -tex
help "if" -tex
help "while" -tex
help "switch" -tex
help "try" -tex
help "odesolve" -tex
help "plotoptions" -tex
help "procedure" -tex
move "<>/docs/texexport/*.tex" -target="<this>/" + _sLangId + "/TeX/documentation/articles/*" -all
print "Articles created. Running LaTeX ..."
$thisfile~runLaTeX(_sLangId);
return void;
endprocedure
##! \procedure runLaTeX
##! Run the XeLaTeX compiler
##!
##! \param _sLangId The current language ID
procedure $runLaTeX(_sLangId) :: explicit
str sRootPath = "<this>/" + _sLangId + "/TeX/documentation", sVersion = getkeyval(getversioninfo(), "Version")
cst mainFile{}
var nPos
## Prepare version number
if (sVersion.fnd(" (x64)"))
sVersion = sVersion.sub(1, sVersion.fnd(" (x64)")-1);
endif
if (sVersion.last == "\"")
sVersion = replace(sVersion, sVersion.fnd("\""), 1, ">>");
sVersion = replace(sVersion, sVersion.fnd("\""), 1, "<<");
endif
## Update version number
mainFile{} = read sRootPath + "/documentation.tex" -keepdim;
nPos = locate(mainFile{}, "\ subtitle{", 2);
mainFile{nPos} = "\ subtitle{NumeRe v" + sVersion + "}";
write mainFile{} -set file=sRootPath + "/documentation.tex" -keepdim nq
## Execute the XeLaTeX compiler
execute "xelatex.exe" -set params=sRootPath + "/documentation.tex -interaction=nonstopmode" wait wp=sRootPath
execute "xelatex.exe" -set params=sRootPath + "/documentation.tex" wait wp=sRootPath
return void;
endprocedure
#**Ende der Datei
* NumeRe: Framework für Numerische Rechnungen | Freie numerische Software unter der GNU GPL v3
* https://www.numere.org/
**************************************************************************************************#