Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Don't auto compile Typst file if output file will be empty #184

Closed
2 tasks done
Andrew15-5 opened this issue Jun 30, 2023 · 1 comment · Fixed by #389
Closed
2 tasks done

Don't auto compile Typst file if output file will be empty #184

Andrew15-5 opened this issue Jun 30, 2023 · 1 comment · Fixed by #389

Comments

@Andrew15-5
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the discussions and believe that my question is not already covered.

Feature Request

Similar to #11, I have a problem when I edit a library/package file which only has defined functions, and automatically I have a useless empty PDF file. I have to remove it all the time or disable LSP plugin and then re-enable it.
I would like to be able to freely edit whatever Typst file I want, but compiled files shall only appear for files that actually typeset something.

For example, if there are only defined variables and functions, then there shouldn't be anything generated. If another Typst file is imported, then the PDF of the main file should only appear if in the imported file something is being typeset. So, if an imported file is a template (like a preamble in LaTeX) or a library, then they and the main file shouldn't be compiled.

@kescobo
Copy link

kescobo commented Jul 14, 2023

I'm having the same problem. An different / probably easier to implement solution might be to have a allow list and or deny list (whitelist/blacklist) to enable selective compilation. Having this automatic detection of things would certainly be nice though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants