James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

Add a flag to get faster approximate builds by not using latexmk #4213

Closed kaba2 closed 4 months ago

kaba2 commented 4 months ago

Pre-checks*

The Missed*

Currently every build in Latex Workshop runs latexmk, which runs pdflatex and other tools as many times as needed to get to a fixed point. This iteration is mostly needed to get the references correct. When writing a Latex paper, I cycle through a modify-build loop: first I write stuff, then I immediately build to see how it looks in the pdf. This is especially useful for equations. For such refinement, calling latexmk is overkill and slow, because I'm not interested in getting the references right, but simply verifying that the typesetting is locally correct.

The Solution*

I wish there was flag for a "fast-preview-mode", where each build calls pdflatex only once, and nothing more. It is up to the user to switch to a non-preview mode once the writing work is done, to prepare the final pdf. On my project this would allow about 3-4 times faster builds.

James-Yu commented 4 months ago

You can create a recipe for running only one tool.

kaba2 commented 4 months ago

Interesting. Here is a link on how to add such a recipe for future readers. It also uses the recipe when I save, which is pretty nice. Thanks.