I am running the following command for latexmk,

latexmk -e "$pdflatex=q/pdflatex -synctex=1 -interaction=nonstopmode/" %.tex -pvc -pdf

But I get the following error,

"I have not found a previewer that is already running. So I will start it for 'file.pdf'"

and the pdf opens in adobe reader. What is the setup required to view the pdf in texmaker's internal viewer and would it also automatically update?

  • Try removing the p from pvc. Commented Oct 6, 2019 at 13:30
  • @HerbSchulz as in only -vc? It gives a bad option error and doesn't compile Commented Oct 6, 2019 at 15:25
  • Try removing the whole option. Commented Oct 6, 2019 at 16:00
  • @HerbSchulz Yeah then it works. But I was hoping that I would be able to do live compilation, which I am now not able to Commented Oct 7, 2019 at 2:37

1 Answer 1


Try to set your default preview like (zathura,okular...)

# launch the katexmk using this command :
$ latexmk -pdf -pvc -interaction=nonstopmode -outdir=build main.tex -f

# sample latexmkrc config
$ cat ~/.latexmkrc

$pdf_previewer = "zathura %O %S";

in the ~/.latexmkrc the dollar in the variable $pdf_previewer is obligatory, then when you set the pdf_previewer *you need to install Zathura in your PATH in your PC.

# in archlinux:
$ pacman -Syy zathura zathura-pdf-mupdf

You must log in to answer this question.

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