Repository navigation
feat(devcontainer): latexindent formatter and build aux files in temp folder - #7
Conversation
05425ee to
9697928
Compare
|
Note: since the auxiliary files no longer remain in the working tree after a successful build (they are written to .latex-build/, which the recipe deletes at the end), most of the file extension patterns in .gitignore\ (*.aux, *.log, *.toc, *.fdb_latexmk, and so on) are no longer strictly necessary. They could be trimmed in a follow-up; only *.gz\ would still be useful, as it ignores the synctex file that stays in the root. |
hegerdes
left a comment
There was a problem hiding this comment.
Thank you for using my template and providing feedback.
I will happy add latexindent as the default formatter and add .latex-build to the ignore.
The other changes seem to be based on personal preferences and these should not go into a general purpose template.
Nevertheless, these are valid options and I would add them either commented out in the .devcontainer/devcontainer.json or as a suggestion part of the main Readme.
| "latex-workshop.latex.recipes": [ | ||
| { | ||
| "name": "latexmk", | ||
| "tools": ["latexmk", "cleanup"] | ||
| } | ||
| ], | ||
| "latex-workshop.latex.tools": [ | ||
| { | ||
| "name": "latexmk", | ||
| "command": "latexmk", | ||
| "args": [ | ||
| "-pdf", | ||
| "-interaction=nonstopmode", | ||
| "-file-line-error", | ||
| "-synctex=1", | ||
| "-auxdir=%AUXDIR%", | ||
| "%DOC%" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "cleanup", | ||
| "command": "rm", | ||
| "args": ["-rf", "%AUXDIR%"] | ||
| } | ||
| ] |
There was a problem hiding this comment.
The aux files can accelerate incremental builds. Deleting them might slow them down.
This is a customization that each user must choose on their own. Feel free to document it as a suggestion for cleaning up the workdir, but it will not go into the template as a new default.
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends texlive-extra-utils \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
There was a problem hiding this comment.
The texlive-extra-utils package is already present in all base images
|
If the aux file annoy you in the vscode explorer, you can just hide them via this vscode setting: "files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
"**/*.aux": true,
"**/*.out": true,
"**/*.fls": true,
"**/*.iml": true,
"**/*.toc": true,
"**/*.bbl": true,
"**/*.lof": true,
"**/*.snm": true,
"**/*.vrb": true,
"**/*.nav": true,
"**/*.blg": true,
"**/*.lot": true
} |
|
Oh, thank you for the information! Would it make sense to keep only the |
6d3379e to
eb2920b
Compare
|
For the default template please keep the aux at the default location. But feel free to add your config as an example (commented out) in the What happend to |
eb2920b to
649ca08
Compare
- devcontainer.json: enable latex-workshop.formatting.latex and keep the auxiliary-files folder config as a commented-out example - Dockerfile: install texlive-extra-utils, which provides latexindent
649ca08 to
410f343
Compare
|
Thanks for the feedback, and sorry for the noise! About the formatter: you are right. I had removed \latexindent\ because I wrongly grouped it together with the other personal-preference changes, but it is a sensible default, so I put it back. About the auxiliary files: the configuration was reverted from the defaults and moved to a commented-out example in \devcontainer.json, as you suggested. One practical note on \latexindent: the setting only works if the binary exists in the container. The current \hegerdes/vscode-latex\ image does not ship it (on Debian trixie it is provided by the \ exlive-extra-utils\ package, installed as /usr/bin/latexindent), so I also added a \RUN\ install in the Dockerfile. |
|
Thx for the PR |
What changed
latex-workshop.formatting.latextolatexindentand includes the auxiliary-files folder configuration as a commented-out exampletexlive-extra-utils, which provides thelatexindentbinary used by the formatterWhy
Without the setting, the "Format Document" command fails with "Please set your LaTeX formatter in latex-workshop.formatting.latex", and the
latexindentbinary is not shipped in the base image.