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

Latextools does not detect changes in file #884

Open
pmaurel35 opened this issue Oct 30, 2016 · 11 comments
Open

Latextools does not detect changes in file #884

pmaurel35 opened this issue Oct 30, 2016 · 11 comments

Comments

@pmaurel35
Copy link

Hello everyone,

I had to reinstall my latex install on windows 10... I installed ST3, latextools and miktex and it's working almost fine ...
The only thing is that when I modify the .tex file it just reopen the previous version of the pdf (it does not recompile). If I delete the temp files and recompile, the changes are taken into account.
I am guessing some problems with latexmk but I cant see what to do ... any suggestion ?

I tried to uninstall/reinstall everything but without success ...

thanks

@ig0774
Copy link
Collaborator

ig0774 commented Oct 31, 2016

Lots of things could be going on here. Can you post the output to the LaTeXTools console of an attempt to compile the document and maybe the log file as well? Also, what settings have you adjusted?

@pmaurel35
Copy link
Author

pmaurel35 commented Oct 31, 2016

ok thanks for you answer .... I was indeed not really clear .... I tried to narrow the problem... apparently something is going wrong with (at least) the biblio... For example I have a very simple file:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}

\begin{document}
test ss \cite{550} 

\bibliographystyle{plain}
\bibliography{example}
\end{document}

and the corresponding example.bib

@BOOK{550,
  title = {MY TITLE},
  author = {Nom1, Prenom1 and Nom2, Prenom2 and Nom3, Prenom3}
}

When I build via ST3 everything works fine but if I change the style from plain to abbrv, the style does not change. If I compile manually (through the command line with pdflatex and bibtex) the style DOES change....

The build console does not show any error or warning and I attached the log file
test.log.txt

edit: oh and if delete temporary file through ST3, of course the style change normally

@ig0774
Copy link
Collaborator

ig0774 commented Oct 31, 2016

That is an odd issue... Are you using the traditional builder or one of the other builders?

@pmaurel35
Copy link
Author

I am using the traditional builder ...

@pmaurel35
Copy link
Author

pmaurel35 commented Oct 31, 2016

Dont know if related but when I try to compile my actual file I have this kind of errors

[no file]: Package natbib Warning: There were undefined citations.
[no file]: Package rerunfilecheck Warning: File `MaThese.out' has changed.
[no file]: LaTeX Warning: There were undefined references.
[no file]: LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

@ig0774
Copy link
Collaborator

ig0774 commented Oct 31, 2016

Can you post the blg file? Also, it might be helpful to try the basic builder instead of the traditional one, since that just runs pdflatex -> bibtex -> pdflatex -> pdflatex.

@pmaurel35
Copy link
Author

pmaurel35 commented Nov 1, 2016

I tried with the basicbuilder and there is no difference ...
Please find below the files I get when I:

  • first compile with plain style for biblio
  • change from plain to abbrv and recompile : the pdf won't change
  • test.bbl
\begin{thebibliography}{1}

\bibitem{550}
Prenom1 Nom1, Prenom2 Nom2, and Prenom3 Nom3.
\newblock {\em MY TITLE}.
\newblock publi, 2016.

\end{thebibliography}
  • test.blg
This is BibTeX, Version 0.99dThe top-level auxiliary file: test.aux
The style file: plain.bst
Database file #1: example.bib

these two files DID NOT change after second compilation (the one after modification of the style), I can see this on the "last modification time" ... and not surprisingly the still style plain.bst in the test.blg file ....

  • On the other hand the file test.aux(dont know if relevant) DID change and contain abbrv reference:
\relax 
\citation{550}
\bibstyle{abbrv}
\bibdata{example}
\bibcite{550}{1}

and again, the test.log.txt

edit: and if after this process (compile with plain style and recompile with abbrv style), I go to the command line and run bibtex test, the output contains the right style: The style file: abbrv.bst and if I compile again (through ST or directly pdflatex on command line) the pdf changes accordingly

@ig0774
Copy link
Collaborator

ig0774 commented Nov 3, 2016

Looking at this again, it appears that changing the bibstyle isn't enough to get LaTeX to complain about missing citations, and so none of the build tools will detect that bibtex needs to be run, hence the lack of updates. There are at least two options you can pursue here, depending on your preferences:

  1. What seems to be the simplest is just to use the Delete Temporary Files command (C-l, backspace) after updating the bibstyle and re-run the build. Things should work as expected from there.
  2. Alternatively, if you plan on frequently changing the build style, you could use the script builder to always run the sequence pdflatex > bibtex > pdflatex > pdflatex, which should always update regardless of any changes, etc. (See the section on the Script Builder in the README that explains exactly how to do that)

@pmaurel35
Copy link
Author

ok thanks for your answer, this was just an small file of what I thought was a "minimal working example" of something bigger ... I dont really need that to change :)

however, what is weird is that when I try to make the same code compile on MacOs everything works fine : the change of style is well taken into account

@ig0774
Copy link
Collaborator

ig0774 commented Nov 3, 2016

On macOS, the traditional builder uses latexmk, which may be smart enough to detect this change. The traditional builder with MiKTeX uses a different engine (texify) which isn't nearly as clever, nor is our basic builder.

@pmaurel35
Copy link
Author

oh ok, thanks for your help ! I thought it was latexmk on both :)

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

No branches or pull requests

2 participants