5 unstable releases
| 0.3.0 | Jan 13, 2025 |
|---|---|
| 0.2.1 | Jan 13, 2025 |
| 0.2.0 | Jan 13, 2025 |
| 0.1.1 | Jan 12, 2025 |
| 0.1.0 | Jan 12, 2025 |
#1361 in HTTP server
131 downloads per month
18KB
349 lines
livetex
A TeX/LaTeX auto builder and deployer.
Demonstration
Usage Example
./livetex -r ~/latex -a 0.0.0.0:8000 -c xelatex --output-format=pdf --halt-on-error
After running the command above, PDF preview is available at http://localhost:8000/<tex-filename> (e.g. http://localhost:8000/foo.tex).
And, everytime the file ~/latex/*.tex changes, the webpage will reload automatically.
CLI Usage
A live integrated server that compiles TeX and serve its PDF automatically on source changes
Usage: livetex [OPTIONS] --root <ROOT>
Options:
-a, --addr <ADDR>
Server address [default: 0.0.0.0:8080]
-r, --root <ROOT>
Root directory to serve
-c, --build-command <BUILD_COMMAND>...
Command to build a TeX file. This argument should be present last
-h, --help
Print help
Alternatives
I've discovered some other approaches to achieve automatic TeX compilation + PDF reloading.
Compilation
-
latexmklatexmk -pdf -pvc -pdflatex='xelatex --halt-on-error' a.tex
Previewing
However, none of them reflect compilation error on the PDF previewing side (they just remain unchanged), which is what I want to achieve.
Dependencies
~12–18MB
~234K SLoC