Skip to content

Instantly share code, notes, and snippets.

@h3y6e
Last active January 10, 2024 10:14
Show Gist options
  • Save h3y6e/10a34c7ce2d39421a8b31e6ed0d7224a to your computer and use it in GitHub Desktop.
Save h3y6e/10a34c7ce2d39421a8b31e6ed0d7224a to your computer and use it in GitHub Desktop.
Dockerを用いてVSCodeにLaTeX環境を作成する
  1. paperist/alpine-texlive-ja をpull
$ docker pull paperist/alpine-texlive-ja
  1. setting.jsonに以下を追記
    "latex-workshop.latex.tools": [
        {
          "name": "ptex2pdf",
          "command": "docker",
          "args": [
            "run",
            "--rm",
            "-v",
            "%DIR%:/workdir",
            "paperist/alpine-texlive-ja",
            "ptex2pdf",
            "-l",
            "/workdir/%DOCFILE_EXT%"
          ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
          "name": "compile",
          "tools": [
            "ptex2pdf"
          ]
        }
    ],
    "latex-workshop.latex.autoBuild.run": "onFileChange",

.texファイル更新時にPDFファイルが出力されるようになる.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment