[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

“exec-path” alone or “PATH” alone is unable to call up SumatraPDF

From: address@hidden
Subject: “exec-path” alone or “PATH” alone is unable to call up SumatraPDF
Date: Mon, 18 Dec 2017 18:04:47 +0800

I construct a latex editing environment by "windows7 + Emacs25.3 + auctex + 
Miktex+SumatraPDF". The package auctex is installed by ELPA of Emacs. As I 
don't want the content of environment variable "Path" of my windows7 operating 
system changed, I put the following codes in "init.el":
;; Put the path of SumatraPDF.exe in the Emacs variable "exec-path":
(setq exec-path (append '("E:/tex/SumatraPDF") exec-path))
;; Put the path of Miktex in the Emacs variable "PATH":
(setenv "PATH" (concat "E:/tex/miktex/miktex/bin" ";" (getenv "PATH")))
;; define tex complier
(setq-default TeX-engine 'xetex)
(setq TeX-command-default "XeLaTeX")
;; define PDF viewer
(setq TeX-PDF-mode t)
(setq TeX-view-program-selection '((output-pdf "SumatraPDF")))

After this, my tex documents can be complied successfully when clicking the 
button "Run LaTex" on the Emacs tool bar, but SumatraPDF does not work when 
clicking the button "Run Viewer".
Then I move the the path of SumatraPDF.exe from "exec-path" to "PATH", 
SumatraPDF.exe does not work eigher. I have to put the path of SumatraPDF.exe 
both in "PATH" and in "exec-path". SumatraPDF.exe does work this time.
So why is that "exec-path" alone or "PATH" alone is unable to call up 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]