-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.py
More file actions
40 lines (35 loc) · 840 Bytes
/
Copy pathbuild.py
File metadata and controls
40 lines (35 loc) · 840 Bytes
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
import os
cwd = os.getcwd()
extra_files = [
"acronyms.fdb_latexmk",
"acronyms.fls",
"acronyms.log",
"main.blg",
"main.fdb_latexmk",
"main.fls",
"main.git1.tmp",
"main.git2.tmp",
"main.idx",
"main.ilg",
"main.ind",
"main.lof",
"main.log",
"main.lot",
"main.out",
"main.run.xml",
"main.toc",
]
for file in extra_files:
try:
os.remove(os.path.join(cwd, file))
except FileNotFoundError:
pass
os.system(f"pdflatex -shell-escape -f -interaction=nonstopmode main")
os.system(f"bibtex main")
os.system(f"pdflatex -shell-escape -f -interaction=nonstopmode main")
os.system(f"pdflatex -shell-escape -f -interaction=nonstopmode main")
for file in extra_files:
try:
os.remove(os.path.join(cwd, file))
except FileNotFoundError:
pass