-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_pdf.py
More file actions
37 lines (27 loc) · 793 Bytes
/
make_pdf.py
File metadata and controls
37 lines (27 loc) · 793 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
#!/usr/bin/python
# This script was based in the file of the Stanford University ACM team
# Packages (archlinux): texlive-binextra texlive-latexextra texlive-fontsextra
import os
import sys
import subprocess
sys.path.append(os.path.join(os.path.dirname(__file__), "tools"))
import content
CONTENT = "content.yaml"
MODEL = "model/notebook.tex"
if __name__ == "__main__":
sections = content.load(CONTENT)
tex = ""
for section in sections:
tex += section.tex()
with open("contents.tex", "w") as f:
f.write(tex)
subprocess.run(
[
"latexmk",
"-pdf",
"-interaction=nonstopmode",
MODEL,
]
)
os.system("mv notebook.pdf algorithms.pdf")
os.system("rm -r contents.tex notebook.*")