Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 3.82 KB

README.md

File metadata and controls

68 lines (50 loc) · 3.82 KB

Latex Dev Container    GitHub release (latest SemVer)  GitHub Workflow Status

A complete development container for Latex for use with VSCode/GitHub Codespaces


Features

Local Usage Requirements

Usage

  1. In the root of your project, create a directory named .devcontainer
  2. Copy the devcontainer.json file from this repository to the newly created directory
  3. optional: Change to image being used for the devcontainer by updating the image field in the JSON file. For example, use the basic texlive install scheme: ghcr.io/willfantom/devcontainer-latex:latest-basic
  4. optional: Add other packages to be installed by tlmgr when the container starts to the postCreateCommand field in the JSON file
  5. Open the project in the devcontainer via the devcontainer CLI, the commands in VSCode, or in a GitHub Codespace

Customization

  • Need specifc packages for your project? Add the appropriate tlmgr command to the postCreateCommand in your devcontainer.json. An example of this has been shown in this repo.

  • You can use this image along with Devcontainer features. For example my dotfiles can be included by adding the following snippet in the devcontainer.json files:

    ...
    "features": {
      ...
      "ghcr.io/willfantom/features/dotfiles:1": {}
    },
    ...

Full TexLive Install

In most cases, I suggest starting with the latest-small tag and adding the packages you need as described here. That said, if you really want a full image, you can easily build this yourself...

For this, you will have to build the container with the build arg TEX_SCHEME set to full. This may end up being around 6GB once built... Make sure to set the image field in the devcontainer JSON file to the tag of your full scheme image.


This has been extended from qdm12/latexdevcontainer with the following core changes:

  • Inclusion of ltex-ls to use with the LanguageTool and LTeX extensions to provide grammar and spell checking in tex documents.
  • Inclusion of inskscape to allow the inclusion of SVG graphics in tex documents.
  • Dark mode PDF preview mode.
  • No explicit reference to the texlive version in the Dockerfile.
  • No use of docker-compose to simplify the devcontainer setup process.
  • Vanilla debian used as the base rather than a specific set of dotfiles (since dotfiles can be added via devcontainer features...).