I would like to define a customized function to open the complied pdf
file of the current tex
file in the default pdf viewer of the system (say SumatraPDF.exe
).
I am primarily interested to a solution without AUCTeX/LateX mode
facilities, though such a solution would be also useful.
*.pdf
file may be different than other users, and most people like thefind-executable
instead of using the absolute path (which I personally prefer). I generally open the*.pdf
that I send to the temporary folder, instead of the one copied to the working folder. You may be interested in usingdired-mode
to open a buffer and then select the*.pdf
file (wherever it is) and then open it using SumatraPDF.exe -- some people seem to like theopen-with
library, but I haven't tried it with Windows. – lawlist Feb 03 '15 at 17:08xp-latexmk
example in the link above and dissect it -- keeping only what you want -- e.g.,(w32-shell-execute "open" latexmk-sumatra latexmk-w32-document)
is what opens the*.pdf
file. NOTE: The code assumes you have built using synctex. You will probably want to remove everything relating to building and cleaning, and also remove the process sentinel stuff. – lawlist Feb 03 '15 at 17:20