File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,19 +135,19 @@ def replace_pdf_figures_with_png(original_tex: str) -> None:
135135
136136 # Replace PDF paths with PNG paths
137137 for match in matches :
138- pdf_image_name = match [1 ]
139- pdf_image = os .path .join (
140- main_directory , os .path .join (graphic_path , pdf_image_name )
138+ image_name = match [1 ]
139+ image_file = os .path .join (
140+ main_directory , os .path .join (graphic_path , image_name )
141141 )
142- if not os .path .exists (pdf_image ):
143- raise FileNotFoundError (f"File not found: { pdf_image } " )
142+ if not os .path .exists (image_file ):
143+ raise FileNotFoundError (f"File not found: { image_file } " )
144144
145- png_image_name = os .path .splitext (pdf_image_name )[0 ] + ".png"
145+ png_image_name = os .path .splitext (image_name )[0 ] + ".png"
146146 png_image = os .path .join (
147147 main_directory , os .path .join (graphic_path , png_image_name )
148148 )
149149
150- utils .convert_pdf_figure_to_png_image (pdf_image , png_image )
150+ utils .convert_pdf_figure_to_png_image (image_file , png_image )
151151
152152 # replace the reference in tex file
153153 content = content .replace (match [1 ], png_image_name )
You can’t perform that action at this time.
0 commit comments