- A TeXLive environment ready to use with VSCode Remote-Container
- Pre-configured tools for editors such as latexindent, synctex, chktex and lacheck
- A ready-made build recipe with latexmk + lualatex
- A ready-made recipe to get diff of the current tex file using latexdiff-vc
- Various snippets that extends LaTeX Workshop ones
- A Tex template using docmute package
- script that keeps track of package info
git clone this repository.
(re-)open the repo's workspace by VSCode Remote-Container extension (VSCode: command palette -> (Dev Container/Remote Container): Reopen in Container).
Then docker image specified in .devcontainer/docker-compose.yml will be automatically pulled and then build process will begin.
A build recipe for LaTeX-Workshop Extension is defined in settings.json.
Just run VSCode: command palette -> LaTeX Workshop: Build with recipe.
It compiles the current tex file and outputs pdf in ./out. The default engine is LuaLaTex.
VSCode: command palette -> Format Document runs latexindent.
In default, the settings for "editor.formatOnSave", and "editor.formatOnPaste" are both set to false.
A user-setting file for latexindent .latexindent.yaml is in the workspace, which is set to be in a search path of latexindent as specified in /root/.indentconfig.yaml. The default setting file for latexindent, which should not be modified, is available via latexindent -vv.
Both chktex and lacheck are enabled by default, and set to run on save as specified by "latex-workshop.linting.run": "onSave".
A user-setting file for chktex .chktexrc is also in the workspace.
The default setting file, which should not be modified, is available at /usr/local/texlive/2023/texmf-dist/chktex/chktexrc.
The recipe for this task is also defined in settings.json.
It runs get-diff.sh, which by default produces diff tex file of current and HEAD, and builds the resulting diff tex to output pdf.
Write tlmgr install packages-you-need in post-install.sh, which is set to run every time Remote-Container is started (see .devcontainer/devcontainer.json).
dump-package-info.sh is executed immediately after each build recipe is successfully completed. It ensures that its output installed-packages.txt keeps the package info at the time of latest successful build.
- About Docker image
.devcontainer/docker-compose.ymldefines the docker image this repo uses. Another image can be set here if you are willing to go to the trouble of re-settling the path set insettings.json. In that case, don't forget to set/your-new-home/.indentconfig.yaml. Scripts in./scriptsare path-independent but are directory-structure-dependent.
- About Snippets
- "dynamic" snippets defined in latex.hsnips depends on Hypersnips Extension.
./script-hsnips.shfetcheslatex.hsnipsfrom my other repository when container is first created, usingonCreateCommandin.devcontainer/devcontainer.json.