Skip to content
Snippets Groups Projects
Commit dc668cc2 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

prace: Sazba samostatného abstractu

parent 834dafa4
No related branches found
No related tags found
No related merge requests found
......@@ -209,6 +209,14 @@ def main(build_dir=Path("build_pdf"), link_out=True):
imageProcessor = ImageProcessor({"": ImageProcessorNamespace(str(build_dir/"img_public_dir"), "/", str(build_dir/"img_cache_dir"), [str(d), str(build_dir)], True)})
for lang, metadata_key, lang_macro in [("cs", "ft.abstract", r"\uselanguage{czech}\frenchspacing\lefthyphenmin=2\righthyphenmin=2{}"), ("en", "ft.en.abstract", r"\uselanguage{USenglish}\nonfrenchspacing\lefthyphenmin=2\righthyphenmin=2{}")]:
with open(build_dir/f"abstract-{lang}.tex", "w") as file:
try:
UCWTexGenerator(file, imageProcessor).generate(pf.Doc(pf.RawBlock(lang_macro, format="tex"), pf.Para(*parse_string(tp.context.get_metadata(metadata_key)))))
except FormatitkoRecursiveError as e:
e.pretty_print(tracebacklimit=tracebacklimit)
return 1
with open(build_dir/"bakalarka.tex", "w") as file:
try:
UCWTexGenerator(file, imageProcessor).generate(doc)
......@@ -230,6 +238,8 @@ def main(build_dir=Path("build_pdf"), link_out=True):
with open(build_dir/"toc.aux", "w") as f:
pass
subprocess.run(["luatex", "abstract-cs"], check=True, cwd=build_dir, env=env)
subprocess.run(["luatex", "abstract-en"], check=True, cwd=build_dir, env=env)
for _ in range(3):
subprocess.run(["luatex", "bakalarka"], check=True, cwd=build_dir, env=env)
with open(build_dir/"toc.aux", "w") as f:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment