Skip to content

Commit 8b4fe91

Browse files
committed
Minor LaTeX/typo fixes
1 parent a907256 commit 8b4fe91

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

generator/templates/training-card.j2.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
This card accompanies the training syllabus for this tool, and should be filled in by an instructor authorised to give training for this tool. They will record your progress for each topic as follows:
1010

11-
\begin{enumerate}
11+
\begin{enumerate}[wide=9pt]
1212
\item[\textbf{D} -] Topic introduced/demonstrated by instructor.
1313
\item[\textbf{1} -] First attempt at exercise by trainee.
1414
\item[\textbf{2} -] Exercise completed by trainee with assistance.
1515
\item[\textbf{3} -] Exercise completed by trainee, further practice needed.
16-
\item[\textbf{4} -] Trainee at satisfactory standard for this topic.
16+
\item[\textbf{S} -] Trainee at satisfactory standard for this topic.
1717
\end{enumerate}
1818

1919
When all topics in a section have been covered, and you have been evaluated for that section, an instructor will sign next to the section heading. When all sections have been signed off, you will have successfully completed this training program, and should sign at the bottom of this page.

generator/training_generator/main.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,13 @@ def add_syllabus(result, relpath, output_dir):
6565

6666

6767
def compile_tex(tex_string, destination_filename):
68+
BUILD_LIMIT = 10
6869
with NamedTemporaryFile("w", encoding="utf-8") as f:
6970
f.write(tex_string)
7071
f.flush()
71-
for i in range(5):
72+
output = "Rerun LaTeX"
73+
num_builds = 0
74+
while "Rerun LaTeX" in str(output):
7275
try:
7376
output = subprocess.check_output(
7477
[
@@ -84,8 +87,9 @@ def compile_tex(tex_string, destination_filename):
8487
except subprocess.CalledProcessError as e:
8588
print(e.output.decode())
8689
raise
87-
if "Rerun LaTeX" not in str(output):
88-
break
90+
num_builds += 1
91+
if num_builds > BUILD_LIMIT:
92+
raise
8993

9094

9195
def generate(syallabus_dir, output_dir, folder_filter):

0 commit comments

Comments
 (0)