Skip to content

Commit 59fdb4c

Browse files
committed
small changes
1 parent 347ca11 commit 59fdb4c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bin/latex.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def run_latexmk(stdout, stderr):
361361

362362
# 1. Copy the latex/problem.tex file to tmpdir/<problem>/latex/<language>/problem.tex,
363363
# substituting variables.
364-
# 2. Create tmpdir/<problem>/latex/<language>/samples.tex.
364+
# 2. Create tmpdir/<problem>/latex/<language>/{samples,constants}.tex.
365365
# 3. Run latexmk and link the resulting <build_type>.<language>.pdf into the problem directory.
366366
def build_problem_pdf(
367367
problem: "problem.Problem", language: str, build_type=PdfType.PROBLEM, web=False
@@ -499,9 +499,8 @@ def build_contest_pdf(
499499
).read_text()
500500

501501
for prob in problems:
502-
if build_type == PdfType.PROBLEM:
503-
prepare_problem(prob, language)
504-
else: # i.e. for SOLUTION and PROBLEM_SLIDE
502+
prepare_problem(prob, language)
503+
if build_type != PdfType.PROBLEM: # i.e. for SOLUTION and PROBLEM_SLIDE
505504
tex_no_lang = prob.path / "problem_statement" / f"{build_type.value}.tex"
506505
tex_with_lang = prob.path / "problem_statement" / f"{build_type.value}.{language}.tex"
507506
if tex_with_lang.is_file():

0 commit comments

Comments
 (0)