I am using Windows 7 x64 with MikTex and WinEdt. I just found latexmk has the function for continuous preview when we type latex document. I would like to know if this works if I type my latex document with WinEdt? I didn't read the manual carefully, but I don't know where I shoud add this command latexmk -pvc -pdf foo. Also, should I try to find a way for auto saving the changed document in order to make latexmk work?

  • I have found that I have installed latexmk when I installed and updated my MikTeX 2.9. But still don't know how to add this command latexmk -pvc -pdf foo
    – user565739
    Nov 1 '11 at 2:31

The simplest way to run latexmk in its continuous preview mode is to start a command window, change directory to where the LaTeX document is, and then type in the command latexmk -pvc -pdf foo. Then latexmk will run continuously, regularly checking the source files for changes. To stop it, either type a control+C or close the command window.

Possibly there's a way of doing this directly from WinEdt, but an expert on WinEdt would need to tell you about that. It is also possible to set up a file association in Windows so that you can right-click on an icon for the LaTeX file and get the above command run; but I don't have a Windows 7 computer to work out the instructions.

There's no need for autosaving the file. Manual saving is better. With the above command, latexmk will compile your document shortly after you save a changed source file. (An autosave is liable to save your file in the middle of the typing of a LaTeX command, which will result in an error in the compilation, and that will probably be excessively annoying.)


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.