1

I've come across an odd problem. Here is what happens:

  1. I run the Sublime Text builder using ⌘-B on a .tex file. This file accesses external data from, say, data.csv.
  2. If I now delete that same data.csv from my disk and run the builder once more, it will compile anyway.
  3. After deleting the temporary files (using LaTeXTools' ⌘-C, Backspace command), compiling will produce the expected error.

This behaviour occurs similarly when trying to use newly installed packages or including a .pdf through \includegraphics.

Also, (2) does not occur when I run latexmk *.tex from the Terminal.

  • Welcome to TeX.SX! I will simply comment instead of answer, because I'm not sure if this is correct. I suspect this is because latexmk builds a database of all the files necessary for compilation (see the *.fdb_latexmk). If the .tex document doesn't change, even if the external files change, latexmk gets tricked into saying "Nothing changed, no reason to recompile!" and doesn't do anything (hence no error). Once the aux files are removed latexmk says "Something has changed, better recompile" and runs into the error. Which plugin for Sublime Text do you use (LaTeXTools, LaTeXing)? – darthbith Apr 11 '15 at 10:18
  • BTW do you have an actual question? :-) You can become more familiar with the usual format of questions by reading our starter guide. Welcome again! – darthbith Apr 11 '15 at 10:21
  • @dartbirth, thanks for the answer provided. I went through the starter guide and - while trying to incorporate the insight you gave in your comment - it now stands as: "Can I make Sublime Text 2 (with the LaTeXTools package installed) recompile, even though the internal file didn't change?". – vuwu Apr 11 '15 at 18:43
  • 1
    @darthbith When contents of an external file change, latexmk will generally do a recompilation. However, there is an explicit exception that if the change is that the file no longer exists, then that by itself doesn't trigger a recompilation. The reason is that normally there is no point doing a recompilation in this situation. It's different if there's a custom dependency for the missing file; in that case latexmk will remake the missing file. – John Collins Apr 13 '15 at 15:15
  • 1
    @darthbith That's how latexmk works at present. The information in the .log about a missing file is often just the base name without an extension or directory, so there are a lot of possibilities to be tested. It would be worth while to improve latexmk's behavior, at least for the common cases. By the way, I've found that a convenient way to trigger a recompilation is just to make an innocuous change to the main .tex file, e.g., adding a space at an end of line. – John Collins Apr 13 '15 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.