Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warnings 'Writing or overwriting python files' #47

Open
kiryph opened this issue Jun 27, 2024 · 2 comments
Open

Remove warnings 'Writing or overwriting python files' #47

kiryph opened this issue Jun 27, 2024 · 2 comments

Comments

@kiryph
Copy link

kiryph commented Jun 27, 2024

When I use robust-externalize version 2.9, I get following warnings:

document.tex|| LaTeX Warning: Writing or overwriting file `robExt-remove-old-figures.py'.
document.tex|| LaTeX Warning: Writing or overwriting file `robExt-prepare-for-arxiv.py'.

I would prefer it when I do not get warnings about things which IMHO I should not be warned about.

It is possible to silence the warnings with

\RequirePackage{silence}
\WarningFilter{latex}{Writing or overwriting file}
\documentclass...

which adds IMHO unnecessary lines of code to a manuscript.

Is theoverwrite option for the environments filecontents really necessary?

\begin{filecontents}[noheader,overwrite]{robExt-remove-old-figures.py}

These files do not change when I recompile. Removing the overwrite option actually avoids unnecessary disc IO as well.

@tobiasBora
Copy link
Contributor

Uhm, so I started to introduce overwrite because I wanted this file to get updated when upgrading the library, to prevent weird bugs from occuring. It does produce a bit of IO… but it is quite negligible and this simplifies the maintenance of the package as otherwise I would need to read this file, compare the md5 with a reference md5 that I'd need to update whcn I change the file… bugs would inevitably occur. I can try to see if I can disable the warning without hidding all similar warnings, hopefully WarningFilter works locally.

@kiryph
Copy link
Author

kiryph commented Jun 28, 2024

I understand when user updating their texlive packages the python files in their document directories can become outdated.

For comparison:
asymptote provides an asymptote.sty and a binary asy. They are both installed into the texmf tree and both get updated when I update my texlive installation. IMHO robust-externalize should provide them similarly.

Side effects:

  • I personally would prefer python code in python files to get full support when writing/editing them (linting/formatting/...) anyway.
  • Less files in folders with LaTeX documents

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

No branches or pull requests

2 participants