Skip to content

Commit 51c7e10

Browse files
committed
fix(preprocess.py): clean tex files before transforming figures
previous log shows that there are non-existed figures in comments, which will cause file not found error, so comments are delete first to prevent this error occurring.
1 parent ab6258a commit 51c7e10

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

vrdu/preprocess.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ def run(original_tex: str) -> None:
181181
"""
182182
Generates a modified version of the given LaTeX document by performing the following steps:
183183
184-
Step 0: Replace EPS figures with PDF to make the LaTeX document compilable with pdflatex.
185-
Step 1: Clean the LaTeX document with arxiv_cleaner package.
184+
Step 0: Clean the LaTeX document with arxiv_cleaner package.
185+
Step 1: Replace EPS figures with PDF to make the LaTeX document compilable with pdflatex.
186186
Step 2: Replace PDF figures with PNG to make pdfminer work.
187187
Step 3: Delete the table of contents from the LaTeX document.
188188
@@ -192,12 +192,12 @@ def run(original_tex: str) -> None:
192192
Returns:
193193
None
194194
"""
195-
# Step 0: replace eps figures to make the tex compilable
196-
replace_eps_figures_with_pdf(original_tex)
197-
198-
# Step 1: clean tex
195+
# Step 0: clean tex
199196
clean_tex(original_tex)
200197

198+
# Step 1: replace eps figures to make the tex compilable
199+
replace_eps_figures_with_pdf(original_tex)
200+
201201
# Step 2: process images
202202
replace_pdf_figures_with_png(original_tex)
203203

0 commit comments

Comments
 (0)