4

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?

4

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.

|improve this answer|||||
  • 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 '15 at 23:22
  • BUt dont seem to be getting it to work – Quantifeye Apr 9 '15 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. – Paul Gessler Apr 9 '15 at 23:30

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.