7

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?

1 Answer 1

7

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.

3
  • Thanks. I was wondering how I would add that to a sublime build file. something like "-e","\\$pdf_previewer = ’start \"d:/sumatra_portable/SumatraPDF.exe\" %O %S’",
    – Quantifeye
    Apr 9, 2015 at 23:22
  • BUt dont seem to be getting it to work
    – Quantifeye
    Apr 9, 2015 at 23:22
  • 1
    @AndreBeelders your question does not mention anything about Sublime Text. I answered the question you asked. Anyway, whether you call latexmk from the command line or from within an editor, the preferences in .latexmkrc should be respected all the same. Apr 9, 2015 at 23:30

You must log in to answer this question.

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