Customized TeX Live Docker image for VSCode LaTeX Workshop.
This Docker image ensures that you can compile LaTeX documents locally even when you cannot connect to Overleaf. It provides a consistent and reproducible environment for LaTeX compilation, including all necessary packages and tools.
- Pre-configured with
lualatex
,latexmk
, and other essential LaTeX tools. - Includes common LaTeX packages for academic writing (e.g.,
ucetd
class,natbib
,graphicx
, etc.). - Optimized for use with VSCode's LaTeX Workshop extension.
- Install Docker.
- Install the LaTeX Workshop extension in VSCode.
Add the following settings to your settings.json
in VSCode to use the Docker image for LaTeX compilation:
"latex-workshop.docker.enabled": true,
"latex-workshop.docker.image.latex": "oaklight/texlive:latest-science",
"latex-workshop.latex.clean.subfolder.enabled": true,
"latex-workshop.latex.recipes": [
{
"name": "latexmk",
"tools": [
"latexmk"
]
}
],
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-lualatex",
"-outdir=%OUTDIR%",
"%DOC%"
],
"env": {}
}
],
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.latex.clean.method": "glob"
- Pull the Docker image:
docker pull oaklight/texlive:latest-science
- Open your LaTeX project in VSCode.
- Save your
settings.json
with the above configuration. - Open a
.tex
file and start editing. The LaTeX Workshop extension will automatically use the Docker image for compilation.
If you want to build the Docker image locally, use the provided Makefile
:
- Clone this repository.
- Run:
make build
This will build the image with the tags oaklight/texlive:latest
and oaklight/texlive:latest-science
.
If you want to push the image to a Docker registry:
make push
To remove the Docker image:
make clean
- Compilation with
lualatex
andlatexmk
. - Support for the
ucetd
document class (University of Chicago Electronic Theses and Dissertations). - Common packages like
natbib
,graphicx
,amsmath
, and more.
- If you encounter missing packages, ensure they are installed in the Docker image. You can modify the
Dockerfile
to include additional packages. - Check the
main.log
file for detailed error messages during compilation.
This project is licensed under the MIT License. See the LICENSE
file for details.