# latexmk -pvc doesn't recompile if included files change

My current project layout looks like this:

Mainfile.tex with \begin{document} including

• preamble (\documentclass, packages, newcommands, etc) and
• chapters, split into separate subfiles.

I'm using the following .latexmkrc to compile with latexmk -pvc -pdf Mainfile.tex:

$pdflatex = "xelatex -src-specials -synctex=1 -interaction=nonstopmode %O %S";$pdf_previewer = "evince %O %S";
$pdf_update_method = 0;$sleep_time = 1;

push @cus_dep_list, "nlo nls 0 nlo2nls";
sub nlo2nls {
system("makeindex $_[0].nlo -s nomencl.ist -o$_[0].nls -t $_[0].nlg"); }  The document compiles perfectly without errors, but latexmk never recompiles it no matter whether I change the main file or one of the included subfiles. Any ideas? Edit: John Collins' right. Not using "start" was the culprit here. - The line setting the pdf_previewer needs to be$pdf_previewer = "start evince %O %S"; with 'start' in front of 'evince'. Otherwise latexmk starts evince and waits for it to terminate. – John Collins Dec 24 '11 at 20:09
@JohnCollins your comment should have been an answer. ;) Scratched my head over this for a few hours. – Alex Dec 25 '11 at 10:34
@Alex: The current form of your question is confusing, as the edited script doesn't produce (anymore) the behaviour you describe. I suggest to undo the last edit and either to either wait for John Collins to write an answer or to write a separate (self-)answer. – lockstep Dec 25 '11 at 10:42
@lockstep Yes, that sounds reasonable. – Alex Dec 25 '11 at 17:54
The line that sets $pdf_previewer needs to be $pdf_previewer = "start evince %O %S";
with 'start' in front of 'evince'. Otherwise, when latexmk runs evince, it waits for evince to terminate, instead of running evince detached
(I probably ought to change latexmk's behavior so that it does the detaching of a previewer automatically when it's in continuous preview mode.)