Commit a237dba4502430a5ffb690ed25f44be9fbd2f03a
1 parent
faf2bd55
*** empty log message ***
Showing
1 changed file
with
47 additions
and
2 deletions
Show diff stats
anubis_dev/library/tools/latex.anubis
| ... | ... | @@ -162,7 +162,7 @@ define String |
| 162 | 162 | + "\\usepackage{longtable}\n" |
| 163 | 163 | + "\\usepackage{fancyhdr}\n" |
| 164 | 164 | + "\\fancyhead{}\n" |
| 165 | - + "\\fancyhead[LE]{\\thepage \\ \\ \\ \\textsl{\leftmark} \hfill}\n" | |
| 165 | + + "\\fancyhead[LE]{\\thepage \\ \\ \\ \\textsl{Section \leftmark} \hfill}\n" | |
| 166 | 166 | + "\\fancyhead[RO]{\\hfill \\textsl{\\rightmark} \\ \\ \\ \\thepage}\n" |
| 167 | 167 | + "\\fancyfoot{}\n" |
| 168 | 168 | + "\\pagestyle{fancy}\n" |
| ... | ... | @@ -206,6 +206,30 @@ define One |
| 206 | 206 | Maybe(String) mb_execution_directory, |
| 207 | 207 | Maybe(String) mb_pdf_directory, |
| 208 | 208 | ) = |
| 209 | + if (Maybe(ExecuteControl))execute(mb_execution_directory,"dvipdf",[file_name+".dvi"]) is | |
| 210 | + { | |
| 211 | + failure then print("Error execute making pdf file \n"), | |
| 212 | + success(s) then | |
| 213 | + if check_execute_status(s) is | |
| 214 | + { | |
| 215 | + still_running then print("compilation is still running 2 \n"), | |
| 216 | + abnormal_termination then print("abnormal_termination 2\n"), | |
| 217 | + finished(i) then | |
| 218 | + if i = 0 then | |
| 219 | + if mb_pdf_directory is | |
| 220 | + { | |
| 221 | + failure then unique, | |
| 222 | + success(pdf_dir) then | |
| 223 | + if (Maybe(Int8))execute(mb_execution_directory,"mv",[file_name+".pdf",pdf_dir]) is | |
| 224 | + { | |
| 225 | + failure then print("Error execute mv pdf \n"), | |
| 226 | + success(mv) then | |
| 227 | + if mv = 0 then print("mv pdf = OK ") else print("Error mv PDF \n") | |
| 228 | + }} | |
| 229 | + else print("Error making pdf file \n")} | |
| 230 | + }. | |
| 231 | + | |
| 232 | + | |
| 209 | 233 | if (Maybe(Int8))execute(mb_execution_directory,"dvipdf",[file_name+".dvi"]) is |
| 210 | 234 | { |
| 211 | 235 | failure then print("Error execute making pdf file \n"), |
| ... | ... | @@ -232,7 +256,28 @@ public define One |
| 232 | 256 | Maybe(String) mb_pdf_directory, |
| 233 | 257 | Int32 compilation_number // 2 if table-of-contents is required |
| 234 | 258 | ) = |
| 235 | - if (Maybe(Int8))execute(mb_execution_directory,"latex",[file_name+".tex"]) is | |
| 259 | + if (Maybe(ExecuteControl)) | |
| 260 | + execute(mb_execution_directory,"latex",[file_name+".tex"]) is | |
| 261 | + { | |
| 262 | + failure then print("Error executing compilation n°"+compilation_number+"\n"), | |
| 263 | + success(s) then | |
| 264 | + if check_execute_status(s) is | |
| 265 | + { | |
| 266 | + still_running then print("compilation is still running 1 \n"), | |
| 267 | + abnormal_termination then print("abnormal_termination 1\n"), | |
| 268 | + finished(i) then | |
| 269 | + if i = 0 | |
| 270 | + then if compilation_number = 1 | |
| 271 | + then make_pdf_file(file_name,mb_execution_directory,mb_pdf_directory) | |
| 272 | + else latex_compilation(file_name,mb_execution_directory, | |
| 273 | + mb_pdf_directory,compilation_number-1) | |
| 274 | + else print("Error compilation n°"+compilation_number+"\n") | |
| 275 | + } | |
| 276 | + }. | |
| 277 | + | |
| 278 | + | |
| 279 | + if (Maybe(Int8)) | |
| 280 | + execute(mb_execution_directory,"latex",[file_name+".tex"]) is | |
| 236 | 281 | { |
| 237 | 282 | failure then print("Error executing compilation n°"+compilation_number+"\n"), |
| 238 | 283 | success(s) then | ... | ... |