I like to use Foxit Reader to view PDF's but it locks the file so i cannot use synctex with it.
So I'd like to use SumatraPDF with AuCTeX when making my PDF's but still have Foxit Reader as my default pdf viewer.
I use windows XP, AuCTeX 11.86 and GNU Emacs 23.3.


After son hours of struggle i finally got what i want.
First you set the PDF viewer of your preference, then you follows these steps http://blog.modelworks.ch/?p=210 (note that you have to set the program list first, then restart emacs, then set the program view selection and restart emacs again) and you are done.

In my case i had to change <directory of your SumatraPDF.exe> -reuse-instance %o to start SumatraPDF -reuse-instance %o but i don't know the reason, maybe you can explain this to me.

  • Great that you got it. It surely is difficult to customize Emacs and AucTeX – Keks Dose Apr 18 '12 at 5:27

No problem. Just use the howto here: http://william.famille-blum.org/blog/static.php?page=static081010-000413 for emacs.

SumatraPDF will become the standard viewer for AucTeX, but not for Windows!

  • I already set up SyncTeX with SumatraPDF but now it seems that the problem is that i can't properly add "sumatraPDF" To the TeX-view-program-list and then choose it at the TeX-view-program-selection. I followed these instructions: hoxide.wordpress.com/2010/08/10/auctex-sumatra-pdf but then the command TeX-view does not work. – Zero Apr 16 '12 at 20:43
  • @Keks Dose wrote:"SumatraPDF will become the standard viewer for AucTeX, but not for Windows!" That makes no sense. SumatraPDF is Windows only browser! On *nix one needs to use MuPDF or write a new PDF viewer in order to use the same PDF rendering libraries like SumatraPDF. – Predrag Punosevac May 18 '12 at 3:50
  • @PredragPunosevac It makes sense. If you customise Emacs/AUCTeX on a Windows-PC, you may make SumatraPDF to be the default PDF viewer for all PDFs started using Emacs commands. But this does not influence at all the behaviour of other software, e.g. the explorer. – Keks Dose May 18 '12 at 8:35
  • Link is dead. That's why good answers provide context for links. – feklee Nov 2 '13 at 16:59
  • @feklee 1. Link is not dead. 2. Thank you for downvoting me and giving smart comments. – Keks Dose Nov 2 '13 at 17:31

I have prepared a batch file, Emacs_SumatraPDF.bat.

It works perfect with sumatra-forward.el to realize forward and backward search.

For example:





put Emacs_SumatraPDF.bat and SumatraPDF.exe --> %Emacs_Home%/bin.

put sumatra-forward.el --> %Emacs_Home%/site-lisp


;Emacs_Home=C:/Program Files (x86)/GNU Emacs 23.4
;~\.emacs add following information

;;; Emacs_SumatraPDF.bat
;;  @info: pdf viewer 
;   @refer: 
(setq TeX-view-program-list '(
      ("Sumatra" "C:/Program Files (x86)/GNU Emacs 23.4/bin/Emacs_SumatraPDF.bat 
                   %o %t %n") ))         

(setq TeX-view-program-selection '(
     (output-pdf "Sumatra") 
     (output-dvi "Yap") 
     ((output-dvi style-pstricks) "dvips and start") 
     (output-html "start"))) 

 ;;; sumatra-forward.el
 ;;  @info: forward search. 
 ;   @refer: http:/william.famille-blum.org/blog/static.php?page=static081010-000413
 (require 'sumatra-forward)

That is all.


Emacs 4 Latex Support under Windows 7 for newcomer for Emacs.



What works for me with GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600) of 2013-03-17 on MARVIN on Windows XP (German):

(setq TeX-view-program-list
      '(("Sumatra PDF"
         "C:/Programme/SumatraPDF/SumatraPDF.exe -reuse-instance %o")))
(setq TeX-view-program-selection
      '(((output-dvi style-pstricks) "dvips and start")
        (output-dvi "Yap")
        (output-pdf "Sumatra PDF")
        (output-html "start")))

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.