LaTeX forum ⇒ AUCTeXSet up "LaTeX+DVI+PS+PDF+PDFViewer" routine

Information and discussion about AUCTeX, an integrated LaTeX environment based on GNU Emacs and XEmacs
ywauto
Posts: 1
Joined: Tue Apr 10, 2012 1:21 am

Set up "LaTeX+DVI+PS+PDF+PDFViewer" routine

Postby ywauto » Tue Apr 10, 2012 1:39 am

I just came across the Emacs+AUCtex distribution for windows. I am very interested to give auctex a try. Since I have been using Texstudio and Winedt for a while, I am so confused to customize emacs+auctex. I hope you guys can help me out:

I use latex+dvi+ps+pdf+pdfviewer routine in Texstudio and Winedt. But it seems quite difficult to set such a routine in emacs+auctex.
I saw some tips to configure latex+dvi+ps+pdf. But after the pdf file is generated by ps2pdf, I can not find a simple way to open the pdf file.
The only way I know is to switch to PDF mode and use VIEW to open the pdf file. It is not very convenient, because I can bundle all these commands to a key in texstudio. So that is the issue I am struggling with in auctex now. :?

Do you have any idea how to define or add a function to open a pdf file under latex mode without switching to TeX-PDF-mode? :?:

Thanks,
Wayne

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
emorkay
Posts: 2
Joined: Sat May 12, 2012 10:42 am

Re: Set up "LaTeX+DVI+PS+PDF+PDFViewer" routine

Postby emorkay » Sun May 13, 2012 1:08 pm

Hi,
Could you tell me how you configured AUCTEX for Latex+DVI+PS+PDF? Also, I usually use a different folder for all the intermediate outputs produced. I have trouble configuring this too. I'll be grateful if you can shed some light on these.

Thanks,
emorkay

emorkay
Posts: 2
Joined: Sat May 12, 2012 10:42 am

Set up "LaTeX+DVI+PS+PDF+PDFViewer" routine

Postby emorkay » Sun May 20, 2012 2:35 pm

Hi,

Try adding the follwing to .emacs and let me know if it's working
(setq my-tex-commands-extra (list 
                            (list "Custom Compile" "latex -interaction=nonstopmode -output-directory=../Outputs/ %s.tex && cd ../Outputs && bibtex %s.aux && cd ../TeX && latex -interaction=nonstopmode -output-directory=../Outputs/ %s.tex && latex -interaction=nonstopmode -output-directory=../Outputs/ %s.tex && mv ../Outputs/%s.dvi ../DVI/%s.dvi && dvips ../DVI/%s.dvi -o ../PS/%s.ps && ps2pdf ../PS/%s.ps ../PDF/%s.pdf && evince ../PDF/%s.pdf" 'TeX-run-command nil t)))
(require 'tex) 
(setq TeX-command-list (append TeX-command-list my-tex-commands-extra))


I use separate directory structure to work with LaTeX files. I use TeX folder to store .tex files and some specific class files, Outputs folder to store intermediate outputs and so on. The command also takes care of the references.

You may edit the command to suit your preferences.

Kindly let me know if it's working for you.

Inspired by the dotemacs found here: http://www.sylwil.eu/wikiss/?page=dotemacs


Return to “AUCTeX”

Who is online

Users browsing this forum: No registered users and 3 guests