参考: Docker+VSCodeで保存時に自動でコンパイルされるLatex環境を作る話 - Qiita Windows10,WSL2ベースのDocker環境で動作確認.
- WSL2のインストール
- Docker Desktop for Windowsのインストール
-
PowerShellから,
$ docker pull paperist/alpine-texlive-ja
- vscodeにLaTeX Workshop - Visual Studio Marketplaceのインストール
-
setting.json
に追記
以下のファイルはDocker+VSCodeで保存時に自動でコンパイルされるLatex環境を作る話 - Qiitaより.{ "[plaintext]": { "editor.quickSuggestions": true, "editor.acceptSuggestionOnEnter": "off" }, "latex-workshop.latex.recipes": [ { "name": "compile", "tools": [ "latexindent", "ptex2pdf", ] } ], "latex-workshop.latex.tools": [ { "name": "ptex2pdf", "command": "docker", "args": [ "run", "--rm", "-v", "%DIR%:/workdir", "paperist/alpine-texlive-ja", "latexmk", "/workdir/%DOCFILE_EXT%", "-latex=uplatex" ] },{ "name": "latexindent", "command": "docker", "args": [ "run", "--rm", "-v", "%DIR%:/workdir", "csegarragonz/latexindent:0.0.1", "latexindent", "/workdir/%DOCFILE_EXT%", "--overwrite" ] } ], "latex-workshop.latex.autoBuild.run": "onSave", "latex-workshop.view.pdf.viewer": "browser", "editor.wordWrap": "on", "latex-workshop.latex.autoBuild.cleanAndRetry.enabled": false, }