[Tex/LaTex] latexmk -pv default previewer

latexmksumatrapdf

I currently use Acrobat as my default pdf viewer for everything other than latex related tasks. So not particularly keen on changing my system default.

I would like to get latexmk to use sumatrapdf to open pdf files.

But I can't figure out where to set this option?

Best Answer

From texdoc latexmk, you can put the following in %HOME%/.latexmkrc if you want this set for anything run by your user, or in <project-dir>/.latexmkrc if you want this set on a per-project basis:

$pdf_previewer = ’start "c:/Program Files/SumatraPDF (x86)/SumatraPDF.exe" %O %S’;

Change the path as appropriate for your installation, of course. The path is quoted because of the spaces in directory names.

Related Question