reitzig / ltx2any

Yet another LaTeX build wrapper, with one or two nifty features
GNU General Public License v3.0
59 stars 4 forks source link

Ignore Powerpoint temp files #89

Closed koppor closed 7 years ago

koppor commented 7 years ago

I am using -d and get following output:

[ltx2any] Waiting for file changes (press ENTER to pause) ... Done

[ltx2any] Copying files to tmp ...
[ltx2any] Error: Permission denied @ rb_sysopen - figures/~$Winery.pptx
          See TopologySplitting.err for details.
[ltx2any] Waiting for file changes (press ENTER to pause) ... Done

[ltx2any] Copying files to tmp ...
[ltx2any] Error: Permission denied @ rb_sysopen - figures/~$Winery.pptx
          See TopologySplitting.err for details.

The ~$...pptx files are temporary files generated by PowerPoint. I would have expected ltx2any to ignore any "common" temporary file.

Suggestion: Why not ignoring all files listed in .gitignore? I always generate the file using https://www.gitignore.io/: https://www.gitignore.io/api/microsoftoffice%2Cwindows%2Cmacos%2Clinux%2Cjabref%2Clatex

I know that it could a problem for detecting file changes then... If that is the case, I would expect ltx2any to ignore the files generated by https://www.gitignore.io/api/microsoftoffice%2Cwindows%2Cmacos%2Clinux%2Cjabref (meaning the above without LaTeX)

I know that I could easily generate parameters for -i based on that list. However, I thought that the tool was smart to know the usual temp files.

(Somehow refs #87)

akerbos commented 7 years ago

There are two issues here:

  1. Loud errors on locked files -- arguably the right thing to do. (Skrew you, windows, it's only read access!)
  2. Ignoring special files -- nope.

To elaborate on 2: it's completely infeasible to program all files some other active tool will write to into ltx2any. It keeps track of its own files (or tries to, at least ;) ) and that's all that you can do, in general.

I always recommend putting your LaTeX stuff in a separate folder. Having a Powerpoint in the same directory gives me the creeps, honestly. X-) If you really need to recompile your thesis and work on your presentation at the same time, the -i parameter is there for you!

Fun fact: on GNU/Linux,

-i "`tr '\n' ':' < .gitignore`"

does what you want with .gitignore.

I'm willing to entertain an option -if that takes files with one file to ignore per line. That's a general solution and easy to implement. That said, I'm still considering introducing config files for ltx2any after all, which would supersede this.

koppor commented 7 years ago

I have my latex stuff in one folder an figures in the figures/ sub folder. This seems to be a normal setting. I keep the source of the figures next to the PDF generated ones. I agree that some variant of our templates have two separate folders figures-pttx and figures (see https://github.com/latextemplates/uni-stuttgart-dissertation-template/tree/template/figures-pptx). Still, both are subfolders of the main document.