[Top][All Lists]

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

Re: Problem with Latex / compile dvi postscript

From: Tim Heaney
Subject: Re: Problem with Latex / compile dvi postscript
Date: 01 Dec 2002 18:19:59 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Military Intelligence)

Christian Banik <address@hidden> 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 ?

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 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

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"
                          (file-name-nondirectory buffer-file-name))))))

With this added to my .emacs file, I can edit the file test1.tex and

  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

and I save the ps file.

I hope this helps,


reply via email to

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