home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.open-look:3756 alt.lucid-emacs.help:389
- Newsgroups: comp.windows.open-look,alt.lucid-emacs.help
- Path: sparky!uunet!elroy.jpl.nasa.gov!ufo!Aig.Jpl.Nasa.Gov!rouquett
- From: rouquett@Aig.Jpl.Nasa.Gov (Nicolas Rouquette)
- Subject: until one can tooltalk pageview...
- Message-ID: <1992Sep8.164110.29741@jpl-devvax.jpl.nasa.gov>
- Sender: usenet@jpl-devvax.jpl.nasa.gov (For NNTP so rrn will be able to post)
- Nntp-Posting-Host: ai-cyclops
- Reply-To: rouquett@aig.jpl.nasa.gov
- Organization: NASA/Jet Propulsion Laboratory
- Date: Tue, 8 Sep 1992 16:41:10 GMT
- Lines: 55
-
- Here's a solution for a quick preview of postscript files particularly
- useful within lucid emacs.
-
- Note: There is a significant difference in the rendering speed between
- pageview and helpviewer. I don't know exactly why since I reckon that
- both programs use the NeWS to process postscript.
-
-
- First, define a new variable:
-
- (defvar tex-print-extension ".dvi"
- "*Normal extension of tex files to be printed.
- Normally .dvi to process tex files.
- Change to .ps to for tex-print commands
- to operate on the ps files instead.")
-
- Then modify a bit the tex-print function:
-
- (defun tex-print (&optional alt)
- "Print the .dvi file made by \\[tex-region], \\[tex-buffer] or \\[tex-file].
- Runs the shell command defined by tex-dvi-print-command. If prefix argument
- is provided, use the alternative command, tex-alt-dvi-print-command."
- (interactive "P")
- (let ((print-file-name-dvi (tex-append tex-print-file tex-print-extension))
- test-name)
- (if (and (not (equal (current-buffer) tex-last-buffer-texed))
- (file-newer-than-file-p
- (setq test-name (tex-append (buffer-file-name)
- tex-print-extension))
- print-file-name-dvi))
- (setq print-file-name-dvi test-name))
- (if (not (file-exists-p print-file-name-dvi))
- (error "No appropriate `%s' file could be found" tex-print-extension)
- (tex-send-command
- (if alt tex-alt-dvi-print-command tex-dvi-print-command)
- print-file-name-dvi))))
-
-
- Finally, customize at will, e.g.:
-
- (setq tex-dvi-print-command "dvips")
- (setq tex-alt-dvi-print-command
- '(format "dvips -p%s -l%s"
- (read-string "First page: ")
- (read-string "Last page: ")))
- (setq tex-dvi-view-command "helpopen")
- (setq tex-dvi-view-extension ".ps")
-
- The net effect is that the same helpviewer process is used over and
- over again to preview tex files.
-
- --
- ----------Nicolas Rouquette----------rouquett@aig.jpl.nasa.gov
- Artificial Intelligence Group
- Jet Propulsion Laboratory
-