Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terasakisatoshi/2ff26fb47f542112b154933c321440d1 to your computer and use it in GitHub Desktop.
Save terasakisatoshi/2ff26fb47f542112b154933c321440d1 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