How to Run the Examples | Aspose.TeX for Python

Prerequisites

Before proceeding, please ensure that the Aspose.TeX-... folder appears in the [PYTHON_PATH]\Lib\site-packages\ folder after the Aspose.TeX package installation. If you have Python 3.11 installed, Aspose.TeX can be installed in the [PYTHON_PATH]\site-packages\ folder. In this case, you should copy the Aspose.TeX folder to the [PYTHON_PATH]\Lib\site-packages\ folder, as PyCharm (at least version 23.1) looks for installed packages exactly in that location.

Download from GitHub

All examples of Aspose.TeX for Python are available on GitHub. You have two options to access the examples: you can either clone the repository using your preferred GitHub client, or you can download the ZIP file from here. Extract the contents of the ZIP file to any folder on your computer. You will find all the examples located in the Aspose.TeX.Examples folder. Below, we will demonstrate how to build and run the examples using popular IDEs.

If you encounter any issues while setting up or running the examples, please feel free to reach out to us through our Forums.

PyCharm

Go to the File menu and choose Open. Select the example project folder and click the OK button. The project will be opened. Then, go to the Run menu and choose Edit Configurations. In the left panel, add a new Python configuration. In the right panel, set the name of the configuration (e.g., “run_examples”). Specify the absolute path to run_examples.py in the Script path field and the absolute path to the project folder in the Working directory field.

To run an example, simply go to the Run menu and choose Run ‘run_examples’, or use the keyboard shortcut Shift+F10. The example will be executed, and the output will be displayed in PyCharm’s console window. The output files generated during the execution of examples can be found in the output folder.

Microsoft Visual Studio

Ensure that the Python development feature is installed in Visual Studio. Open Visual Studio and click on the right side of the Open a local folder item. Then, browse to the Aspose.TeX examples project folder. Visual Studio will recognize it as a Python project and open the Python IDE. Once the folder is opened, right-click on “run_examples” in the Solution Explorer, and select Set as Startup item

To run examples, just click on the run_examples.py button with the green arrow in the toolbar at the Visual Studio window.

Contribute to Aspose.TeX for Python

If you would like to contribute to the project by adding or improving an example, we highly encourage you to do so. All examples and showcase projects in this repository are open-source and can be freely used in your applications.

If you wish to contribute, you can fork the repository, make changes to the source code, and create a pull request. We will review the changes and include them in the repository if they are deemed helpful.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.