From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Tim Heaney" Newsgroups: gmane.emacs.help Subject: Re: Problem with Latex / compile dvi postscript Date: 01 Dec 2002 18:19:59 -0500 Organization: Posted via Supernews, http://www.supernews.com Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87hedxmin4.fsf@mrbun.watterson> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1038785102 21096 80.91.224.249 (1 Dec 2002 23:25:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 1 Dec 2002 23:25:02 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18IdSO-0005Tr-00 for ; Mon, 02 Dec 2002 00:25:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18IdTP-0003Pv-00; Sun, 01 Dec 2002 18:26:03 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help X-Attribution: Tim X-URL: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Military Intelligence) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 60 Original-Xref: shelby.stanford.edu gnu.emacs.help:107630 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:4180 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4180 Christian Banik writes: > > If you've just written (for example) test1.tex, how can you tell Emacs > to compile that file? How can you tell Emacs to create the file > test1.dvi and test1.ps ? If you are editing test1.tex in TeX mode--- it should say (TeX) or (TeX Fill) in the modeline--- then C-c C-b should tex it (to a temp file) C-c C-v should view it (from that temp file) C-c C-p should print it (from that temp file) so you can tex, preview, and print the file you are working on without creating permanent copies of the intermediate files. If you want to keep the intermediate files, then C-c C-f should tex it (creating test1.dvi) and you can run the command line program dvips from within Emacs with M-! dvips test1 creating test1.ps. Recent versions of Emacs should have a menubar across the top and in TeX mode, you should have a menu called "TeX" with the above commands and more in it. If you do not have TeX mode (if editing a .tex file or typing M-x tex-mode does not put you in TeX mode), then try http://mirrors.sunsite.dk/auctex/www/auctex/ I don't have a printer myself, so I wanted to make C-c C-p take the temporary dvi file and make a permanent ps file. I don't know very much elisp, so I asked how I might do that in this newsgroup earlier this year and Kevin Rodgers kindly suggested the following: (add-hook 'tex-mode-hook ; or whatever it's called (lambda () (set (make-local-variable 'tex-dvi-print-command) (format "dvips * -o %s.ps" (file-name-sans-extension (file-name-nondirectory buffer-file-name)))))) With this added to my .emacs file, I can edit the file test1.tex and then C-c C-b tex it (to a temp file) C-c C-v view it (from that temp file) C-c C-p dvips it (from that temp file to test1.ps) and I save the ps file. I hope this helps, Tim