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.
*.pdffile may be different than other users, and most people like thefind-executableinstead of using the absolute path (which I personally prefer). I generally open the*.pdfthat I send to the temporary folder, instead of the one copied to the working folder. You may be interested in usingdired-modeto open a buffer and then select the*.pdffile (wherever it is) and then open it using SumatraPDF.exe -- some people seem to like theopen-withlibrary, but I haven't tried it with Windows. – lawlist Feb 03 '15 at 17:08xp-latexmkexample 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*.pdffile. 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