Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

4 Answers

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")))
share|improve this answer
add comment

I have prepared a batch file, Emacs_SumatraPDF.bat.

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

For example:

Download

http://www.ai.soc.i.kyoto-u.ac.jp/~shi/files/Emacs_SumatraPDF.bat

http://william.famille-blum.org/software/sumatra/sumatra-forward.el


Prepare

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

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


Usage

;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.


Besides

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

http://www.ai.soc.i.kyoto-u.ac.jp/~shi/latex/emacs4ls.html


share|improve this answer
    
Welcome to TeX.sx! –  Peter Jansson Apr 29 '13 at 11:28
add comment

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.

share|improve this answer
    
Great that you got it. It surely is difficult to customize Emacs and AucTeX –  Keks Dose Apr 18 '12 at 5:27
add comment

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!

share|improve this answer
    
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. –  Diego S. 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
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.