Created
October 20, 2025 17:55
-
-
Save aspose-com-gists/abec8eb5ae7b91dc3c244479c1fbfc57 to your computer and use it in GitHub Desktop.
Repair LaTeX File in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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