This repository provides a Python-based graphical interface and PowerShell script to automate the process of compiling a LaTeX CV (cv.tex
) file into a PDF. The system offers a straightforward, user-friendly method for compiling LaTeX documents and managing the generated output.
- Graphical Interface: A Python Tkinter GUI enables users to select the project directory and run the compilation process without using the command line.
- Automated Compilation: The PowerShell script compiles the LaTeX
cv.tex
file using XeLaTeX and cleans up temporary files, ensuring the output folder only contains the final PDF. - Cross-Platform: While the PowerShell script is tailored for Windows, the Python GUI can run on any system that supports Tkinter, with minor adjustments for Linux/macOS.
Before using the system, ensure the following software is installed:
- XeLaTeX: A LaTeX distribution (e.g., MiKTeX or TeX Live) with support for XeLaTeX. Verify installation by running:
xelatex --version
- Python 3.x: Required to run the
latex_cv_compiler.py
script. Install it from the official Python website. - Tkinter: Bundled with most Python installations. Confirm its installation by attempting to import it in a Python shell:
import tkinter
Download this repository as a ZIP file by clicking the "Code" button at the top of the repository page on GitHub and selecting "Download ZIP". Extract the contents of the ZIP file to a folder on your computer.
Ensure your LaTeX file (cv.tex
) is in the extracted folder. Verify that the script.ps1
file is also in the same directory. This script will handle the compilation process.
- Open a terminal or command prompt and navigate to the folder where the repository was extracted.
- Run the Python script to open the graphical interface:
python latex_cv_compiler.py
In the GUI:
- Click the "Select Project Directory" button.
- Navigate to the folder containing both
cv.tex
andscript.ps1
. - The selected directory path will appear in the GUI window.
Once the project directory is selected:
- Click the "Run Compilation Script" button.
- The PowerShell script will execute the LaTeX compilation process.
- Monitor the log output in the GUI for progress and any potential errors.
The final PDF will be placed in an output
folder within the project directory. Non-PDF files will be automatically removed after compilation.
- The compiled PDF will be located in the
output
folder. - Temporary files (e.g.,
.aux
,.log
) will be deleted automatically.
-
PowerShell Errors: If the PowerShell script fails to run, ensure PowerShell’s execution policy allows scripts to run. Temporarily set the execution policy to "Bypass" with:
Set-ExecutionPolicy Bypass -Scope Process
-
File Not Found: If the Python GUI reports missing files (
cv.tex
orscript.ps1
), ensure both are present in the selected directory.
- Edit the
cv.tex
file to include your CV content, formatting, and structure. - Adjust the
script.ps1
file to modify the output directory or include additional LaTeX compilation steps if needed.