This repository—Underleaf—contains the setup and scripts used to author, render, and manage LaTeX documents inside a Dockerized environment using VS Code. It is ideal for students, researchers, or professionals who want to:
- Use LaTeX without installing TeX Live directly on their machine
- Easily build reproducible LaTeX environments
- Version control LaTeX projects with Git
- Maintain lightweight and portable LaTeX builds
├── Dockerfile # Docker image definition with full TeX Live
├── build.sh # Build script to compile LaTeX project
├── clean.sh # Script to remove build artifacts
├── references.bib # BibLaTeX-compatible bibliography file
├── report.tex # Your main LaTeX source file
├── images/ # Folder containing embedded images
│ ├── landing.png
│ ├── welcome.png
│ └── ist.png
├── .gitignore # Optional: git ignore rules for LaTeX artifacts
└── README.md # This file
docker build -t underleaf .docker run --rm -it -v $(pwd):/workspace underleafThis mounts your project into the container and starts an interactive shell.
Inside the container:
./build.sh./clean.sh-
The
build.shscript useslatexmkwithbiberas the backend forbiblatex -
The Docker image installs:
texlive-fullbiber- Essential LaTeX packages (e.g.
biblatex,csquotes,microtype,hyperref, etc.)
- Make sure your
.bibfile is properly formatted (e.g., APA or IEEE viabiblatex) - We recommend using
style=ieeeinbiblatexfor numbered references
Use the provided clean.sh to remove auxiliary files and keep your repo clean:
./clean.shThis removes:
.aux,.log,.toc,.out,.bbl,.blg, etc.
- You can use VS Code’s LaTeX Workshop extension for editing and syntax highlighting
- For very large images or PDFs, compress them before including
- Always run
build.shinside the Docker container for consistency
- Add
Makefilefor platform-independent building - Enable PDF optimization post-processing
- Add support for multiple output formats (PDF, HTML)
Feel free to fork and contribute improvements for handling bibliography styles, Docker optimizations, or tooling integrations.
MIT License
Underleaf: Reproducible, portable, and professional LaTeX workflows in VS Code with Docker.