RusTeX is a simple command-line utility written in Rust for compiling LaTeX files to PDF format. It provides an easy-to-use interface for converting .tex
files into .pdf
files using the pdflatex
compiler.
- Compile LaTeX files to PDF format.
- Minimal setup required.
- Cross-platform compatibility (works on Windows, macOS, and Linux).
- Rust programming language installed (https://www.rust-lang.org/)
- LaTeX distribution with
pdflatex
command (e.g., TeX Live, MiKTeX, BasicTeX, etc.)
-
Ensure you have Rust installed on your system by following the instructions on the official Rust website.
-
Make sure you have a LaTeX distribution installed that includes
pdflatex
. You can install TeX Live (https://www.tug.org/texlive/) or MiKTeX (https://miktex.org/) for this purpose. -
Compile the RustLatex project:
rustc main.rs
-
Run the executable with the input LaTeX file and desired output PDF file as arguments:
./main input.tex output.pdf
Replace
input.tex
with the path to your LaTeX file andoutput.pdf
with the desired name for the output PDF file.The
output.pdf
file will be created in the src directory.
Compile a LaTeX file named example.tex
to produce example.pdf
:
./main example.tex example.pdf
- You may encounter warnings or errors during the compilation process. These are typically related to the OS itself and not the RusTeX utility.
- A common warning is "Error moving out PDF file: No such file or directory (os error 2)". This is due to the fact that the PDF file is still being generated when the utility tries to move it. This warning can be safely ignored.
- "Why does it generate an .aux and a .log file?"
- These files are generated by the LaTeX compiler as part of the compilation process. They are used for various purposes such as cross-referencing, citations, and error logging.
This is a brief example of my project.
This project is licensed under the MIT License - see the LICENSE file for details.