[Top][All Lists]

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

Re: File variables in tex-site.el

From: Matthias Rempe
Subject: Re: File variables in tex-site.el
Date: 02 May 2003 15:07:52 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "FCC" == F C Caner <address@hidden> writes:

    > "Ulrich Dirr" <address@hidden> wrote in message
    > news:address@hidden
    >> Just to recall: I want to invoke PDFeLaTeX and when compiling
    >> was successful automatically invoke 'View PDF' without any key
    >> to be pressed. And of course it would be a nice feature if
    >> Emacs could close any PDF document in Acrobat(Reader) before
    >> compiling (because Acrobat blocks the file) and changing to
    >> Acrobat if all above was successfully done. Then
    >> work/compile-cycles would be really economic and could save
    >> really much time especially on bigger projects when finetuning
    >> requires many corrections (with recompiling), don't you think
    >> so?

    > I am suffering from exactly the same thing, and I think it is
    > time to solve this problem. I think launching the Acrobat Reader
    > right after using LaTeX Pdf can be done from within
    > Emacs. However, to close the document in the Acrobat Reader, I
    > don't know if elisp can be used. 

The following snippets in my tex-site.el are from some posting of
Jesper Harder that I found with google:

| ;;; von Jesper Harder:
| (defun acrobat-close-all-docs ()
|   "Close all open documents in Acrobat."
|   (save-excursion
|     (set-buffer (get-buffer-create " *ddeclient*"))
|     (erase-buffer)
|     (insert "[CloseAllDocs()]")
|     (call-process-region (point-min) (point-max)
|  "ddeclient" t t nil "acroview" "control")
|     (if (= 0 (string-to-int (buffer-string))) t nil)))
| (defun TeX-run-pdfLaTeX (name command file)
|   "Create a process for NAME using COMMAND to format FILE with pdfLaTeX."
|   (acrobat-close-all-docs)
|   (TeX-run-LaTeX name command file))

In TeX-command-list add this entry:

| (list "pdfLaTeX" "pdflatex '\\nonstopmode\\input{%t}'"
|             'TeX-run-pdfLaTeX nil t)


reply via email to

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