gzurowski/latex-devcontainer

By gzurowski

Updated 4 months ago

Ready-to-use LaTeX environment for VSCode Dev Containers

Image
Languages & frameworks
0

4.2K

gzurowski/latex-devcontainer repository overview

LaTeX Dev Container

Docker Hub Build License: MIT

Create LaTeX Project

LaTeX Dev Container Logo

Ready-to-use LaTeX environment for Visual Studio Code Dev Containers.

A complete LaTeX environment with zero configuration. No installation, no subscription, no limitations.

Ready-to-use images available on Docker Hub.

Features

Quick Start

Option 1: Visual Studio Dev Container

You must have Docker and Visual Studio Code with the Dev Containers extension installed. See the Visual Studio Code's Dev Containers documentation for setup details.

You can simply create a new LaTeX project repository with this template:

Create LaTeX Project

Or, you can manually add the following .devcontainer/devcontainer.json file to your project:

{
  "name": "LaTeX",
  "image": "gzurowski/latex-devcontainer:full",
  "customizations": {
    "vscode": {
      "extensions": ["James-Yu.latex-workshop"],
      "settings": {
        "editor.formatOnSave": true,
        "latex-workshop.formatting.latex": "latexindent",
        "latex-workshop.latex.autoBuild.run": "onSave",
        "latex-workshop.linting.chktex.enabled": true
      }
    }
  }
}

Target the desired scheme using the image tag (basic, medium or full).

Open the folder in VSCode and select Dev Containers: Reopen in Container.

Option 2: GitHub Codespaces

Click the button below to launch a fully configured LaTeX environment in your browser:

Open in GitHub Codespaces

Option 3: Docker

You can also use the container directly (without Visual Studio Code) to build your LaTeX projects:

docker run --rm -v $(pwd):/workspace -w /workspace gzurowski/latex-devcontainer:full latexmk -pdf document.tex

This mounts your current directory into the container, builds the document, and writes the output PDF back to the host.

Additional Packages

Use the TeX Live package manager to install packages not included in your chosen scheme:

tlmgr install <PACKAGE_NAME>

For a persistent installation, extend the Dockerfile or add to postCreateCommand in your devcontainer.json file:

{
  "postCreateCommand": "tlmgr install <PACKAGE_NAME>"
}

Images and Tags

The following container images are available:

TagDescriptionSize (compressed)
basicBasic scheme is a minimal LaTeX installation.~350 MB
mediumMedium scheme with more packages and languages~700 MB
fullFull scheme with everything~2.4 GB

If you install a scheme smaller than full, you can still add any missing packages later with tlmgr.

Included Tools

The following tools are included with every image:

ToolDescription
biberBibliography processing for BibLaTex.
chktexCode linter.
latexindentCode formatter.
latexmkBuild tool.
tlmgrPackage manager

Building from Source

Clone the repository and build with Docking using the following commands.

Basic scheme (default):

docker build -t latex-devcontainer .

Full scheme:

docker build --build-arg TEXLIVE_SCHEME=scheme-full -t latex-devcontainer:full .

Issues

If you encounter any problems or have suggestions, please open an issue.

License

This project is licensed under the MIT License.

Tag summary

Content type

Image

Digest

sha256:4d93c8cf6

Size

2.3 GB

Last updated

4 months ago

docker pull gzurowski/latex-devcontainer:full