Skip to content

feat(devcontainer): latexindent formatter and build aux files in temp folder - #7

Merged
hegerdes merged 1 commit into
hegerdes:mainfrom
diasgarcia:feat/devcontainer-compilacao-limpa
Aug 18, 2026
Merged

hegerdes merged 1 commit into
hegerdes:mainfrom
diasgarcia:feat/devcontainer-compilacao-limpa

Conversation

@diasgarcia

@diasgarcia diasgarcia commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • devcontainer.json: sets latex-workshop.formatting.latex to latexindent and includes the auxiliary-files folder configuration as a commented-out example
  • Dockerfile: installs texlive-extra-utils, which provides the latexindent binary used by the formatter

Why

Without the setting, the "Format Document" command fails with "Please set your LaTeX formatter in latex-workshop.formatting.latex", and the latexindent binary is not shipped in the base image.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thank you for contributing, we will check it out very soon

@diasgarcia
diasgarcia force-pushed the feat/devcontainer-compilacao-limpa branch from 05425ee to 9697928 Compare August 16, 2026 21:49
@diasgarcia diasgarcia changed the title feat(devcontainer): formatador latexindent e compilacao com aux em pasta temporaria feat(devcontainer): latexindent formatter and build aux files in temp folder Aug 16, 2026
@diasgarcia

Copy link
Copy Markdown
Contributor Author

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 hegerdes left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .devcontainer/devcontainer.json Outdated
Comment on lines +25 to +49
"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%"]
}
]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .devcontainer/Dockerfile
Comment on lines +9 to +12
RUN apt-get update \
&& apt-get install -y --no-install-recommends texlive-extra-utils \
&& rm -rf /var/lib/apt/lists/*

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The texlive-extra-utils package is already present in all base images

@hegerdes

Copy link
Copy Markdown
Owner

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
}

@diasgarcia

Copy link
Copy Markdown
Contributor Author

Oh, thank you for the information! Would it make sense to keep only the .latex-build configuration, so the auxiliary files are stored there instead of in the project root, without deleting them after each build?

@diasgarcia
diasgarcia force-pushed the feat/devcontainer-compilacao-limpa branch 3 times, most recently from 6d3379e to eb2920b Compare August 17, 2026 12:00
@hegerdes

Copy link
Copy Markdown
Owner

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 devcontainer.json or ReadMe.

What happend to "latex-workshop.formatting.latex": "latexindent"?
I liked that change

@diasgarcia
diasgarcia force-pushed the feat/devcontainer-compilacao-limpa branch from eb2920b to 649ca08 Compare August 17, 2026 17:09
- 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
@diasgarcia
diasgarcia force-pushed the feat/devcontainer-compilacao-limpa branch from 649ca08 to 410f343 Compare August 17, 2026 17:10
@diasgarcia

Copy link
Copy Markdown
Contributor Author

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.

@hegerdes
hegerdes merged commit e3e9625 into hegerdes:main Aug 18, 2026
1 check passed
@hegerdes

Copy link
Copy Markdown
Owner

Thx for the PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants