1

I am running MikTeX 2.9 and TeXworks 0.4.6 under Windows 10. I have a TeX document and the corresponding pdf open side by side.

When I compile the TeX document (with pdftex) I want the pdf to automatically refresh, without having to close it and then open it. With many documents, I get exactly the behavior I want. Call these the "good documents".

But with some documents, I compile, the process runs, but the old pdf is still showing. I then have to close the pdf and re-compile, which opens a new updated pdf. Call these the "bad documents".

Until very recently, this has been driving me crazy because I couldn't figure out what made some documents good and others bad. Today it finally dawned on me to try moving some documents around on my hard drive and I discovered the pattern---a given document becomes good or bad depending on which Windows directory it sits in. For example, all documents in my root directory are bad. If I copy them to other directories, they become good.

Questions: 1) What on earth is causing this? 2) How do I fix it so that I can store documents where I want them and still get the automatic refreshes that I want?

1
  • if roots means something like C: then don't put documents there. Oct 26, 2020 at 7:09

1 Answer 1

0

I can confirm the behavior and have created a bug report here https://github.com/TeXworks/texworks/issues/908. It has driven me nuts as well, thank you for your post.

Update: It has been fixed in the latest development version. Until this is rolled out (or you installed it resp. a new production version which has this fixed) not putting the TeX-files in a top-level directory is the only way.

5
  • Thank you..........
    – WillO
    Nov 1, 2020 at 13:46
  • If this answer is okay for you please accept it. Nov 2, 2020 at 19:51
  • I'm grateful for your help and glad this will be fixed for future generations. I'd have preferred a quick fix but I understand that this isn't in the cards. Thanks again.
    – WillO
    Nov 3, 2020 at 18:44
  • Also---it's quite helpful to have the confirmation that only files in the root directory are affected; I had wondered if other directories might have the problem as well. Now that I know this, I'll write a .bat file taking the name of a tex file as an argument, which moves that file to a temporary directory, opens it in TeXWorks, and moves it back to the root directory (where I really want it) after it's been closed.
    – WillO
    Nov 3, 2020 at 21:16
  • It gets even more strange! Visual Studio Code with the "LaTeX Workshop" Plugin shows exactly the same behaviour. Another bug report... Nov 5, 2020 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .