help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: File variables in tex-site.el


From: Dr. F.C.Caner
Subject: Re: File variables in tex-site.el
Date: 7 May 2003 04:28:53 -0700

Here is how I modified TeX-run-pdfLaTeX so that resulting pdf file is
viewed in the Acrobat Reader right after compiling is done. However,
the first time launching of the Reader must be done manually. In the
subsequent compilations the Reader will automatically redisplay the
resulting pdf file (like the dvi viewers).

Best,

FCC.

(defun acrobat-open-doc (file)
  "Open document `file' in Acrobat."
  (save-excursion
    (set-buffer (get-buffer-create "*ddeclient*"))
    (erase-buffer)
    (insert (concat "[FileOpenEx(\"" file ".pdf\")]"))
    (call-process-region (point-min) (point-max)
       "c:/EmacsPlugins/ddeclient/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)
  (acrobat-open-doc file)
)



address@hidden (Dr. F.C.Caner) wrote in message news:<address@hidden>...
> Hello all. First, thanks for your interest.
> 
> I am using WindowsXP. Apparently I did not have ddeclient.exe, so I
> first downloaded it, and placed it under c:/EmacsPlugins/ddeclient.
> Now when I invoke PdfLaTeX, it closes all the documents in the Acrobat
> Reader before compiling the LaTeX file. This is actually a big
> convenience. However, to solve the problem completely, Emacs must
> launch the reader right after PdfLaTeX'ing the document. Can this be
> done?
> 
> Thanks again and best,
> 
> FCC.
> 
> Jesper Harder <address@hidden> wrote in message news:<address@hidden>...
> > address@hidden (Dr. F.C.Caner) writes:
> > 
> > > This is just great, but I could not get it working. I am not getting
> > > any error messages either. Actually, I cannot see any buffer named
> > > *ddeclient* at all. When I eval (acrobat-close-all-docs) in the
> > > *scratch* buffer, the function returns t and Acrobat reader does
> > > nothing. Any idea what is happening?
> > 
> > Which operating system are you using?  
> > 
> > The DDE stuff _only_ works on ms-windows -- the Unix version of
> > Acrobat doesn't support any kind of interapplication communication.


reply via email to

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