Usage Emacs_Home=C:/Program Files (x86)/GNU Emacs 23.4 ![]() Put sumatra-forward.el -> %Emacs_Home%/site-lisp ![]() Put Emacs_SumatraPDF.bat and SumatraPDF.exe -> Http://software/sumatra/sumatra-forward.el It works perfect with sumatra-forward.el to realize forward and backward search. I have prepared a batch file, Emacs_SumatraPDF.bat. In both cases (with or without assq-delete-all) I now need to insert the code in the proper hook, since TeX-view-program-selection is void in init.el. The first line is optional, but it makes the list look "cleaner". (add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF")) To update TeX-view-program-selection I could use: (assq-delete-all 'output-pdf TeX-view-program-selection) Please tell me if this question is best fit on tex.stackexchange Update based on lunaryorn comments/answer It is mostly an ELisp question concerning the manipulation of the variable TeX-view-program-selection. I’d like to change this one to "Sumatra PDF" and leave the other values to their default, that is, I’d like to ask Emacs the default values for the viewers and change only the PDF value. If I didn’t set the last expression, (setq TeX-view-program-selection., I would get the default values, which are the same as above, apart from the value for the PDF output that would be: (output-pdf "start"). To set a double click on the PDF to get me to the related LaTeX code, I also set in Sumatra options Set inverse search command line to: "c:\bin86\GNU Emacs 24.2\bin\emacsclient.exe" -no-wait %l "%f"ĭespite the sync works, I’d like to code it differently. (output-pdf "Sumatra PDF") (output-html "start"))) '(((output-dvi style-pstricks) "dvips and start") (output-dvi "Yap") (mode-io-correlate " -forward-search %b %n ") " %o")))) '(("Sumatra PDF" ("\"C:/bin86/SumatraPDF/SumatraPDF.exe\" -reuse-instance" (setq TeX-source-correlate-method 'synctex) With these lines in my init.el I am able to sync the Emacs LaTeX buffer with Sumatra: (setq TeX-source-correlate-mode t)
0 Comments
Leave a Reply. |