Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created October 20, 2025 17:55
Show Gist options
  • Select an option

  • Save aspose-com-gists/abec8eb5ae7b91dc3c244479c1fbfc57 to your computer and use it in GitHub Desktop.

Select an option

Save aspose-com-gists/abec8eb5ae7b91dc3c244479c1fbfc57 to your computer and use it in GitHub Desktop.
Repair LaTeX File in Python
from aspose.tex.features import *
import aspose.tex as tex
from aspose.tex.io import *
from os import path
# Apply Aspose.PSD license.
license_path = "license.lic"
license = tex.License()
license.set_license(license_path)
# Create repair options by instantiating an object of the LaTeXRepairerOptions class.
options = LaTeXRepairerOptions()
# Specify a file system working directory for the input/output.
options.output_working_directory = OutputFileSystemDirectory("data")
options.required_input_directory = InputFileSystemDirectory( "data\packages")
# Run the repair process by calling the run() method.
LaTeXRepairer("invalid-latex.tex", options).run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment