* File variables in tex-site.el
@ 2003-04-30 9:31 Ulrich Dirr
2003-04-30 14:34 ` Kai Großjohann
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Ulrich Dirr @ 2003-04-30 9:31 UTC (permalink / raw)
I'm wondering what all the file variables mean (%t, %f, %s, etc.).
I would like to customize the list shown below. Where can I find an
explanation what variables exist and what's their meaning?
;; The fpTeX commands.
(setq TeX-command-list
(list (list "TeX" "tex \\nonstopmode\\input %t" 'TeX-run-TeX nil t)
(list "LaTeX" "%l \\nonstopmode\\input{%t}" 'TeX-run-LaTeX nil t)
(list "LaTeX PDF" "pdflatex \\nonstopmode\\input{%t}" 'TeX-run-LaTeX
nil t)
(list "eLaTeX PDF" "pdfelatex \\nonstopmode\\input{%t}" 'TeX-run-LaTeX
nil t)
(list "View" "%v" 'TeX-run-command t nil)
(list "View PS" "gsview32 %f" 'TeX-run-command t nil)
(list "View PDF" "start %s.pdf" 'TeX-run-command t nil)
(list "Print" "dvips %d" 'TeX-run-command t nil)
(list "File" "dvips %d -o %f " 'TeX-run-command t nil)
(list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil)
(list "Index" "makeindex %s" 'TeX-run-command nil t)
(list "Check" "lacheck %s" 'TeX-run-compile nil t)
(list "Spell" "<ignored>" 'TeX-run-ispell-on-document nil nil)
(list "Makeinfo" "makeinfo %t" 'TeX-run-compile nil t)
(list "AmSTeX" "amstex \\nonstopmode\\input{%t}" 'TeX-run-TeX nil t)
(list "Other" "" 'TeX-run-command t t)))
Ulrich Dirr
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-04-30 9:31 File variables in tex-site.el Ulrich Dirr
@ 2003-04-30 14:34 ` Kai Großjohann
2003-04-30 14:59 ` David Kastrup
2003-05-01 10:00 ` Dr. F.C.Caner
2 siblings, 0 replies; 20+ messages in thread
From: Kai Großjohann @ 2003-04-30 14:34 UTC (permalink / raw)
"Ulrich Dirr" <ud@art-satz.de> writes:
> I'm wondering what all the file variables mean (%t, %f, %s, etc.).
> I would like to customize the list shown below. Where can I find an
> explanation what variables exist and what's their meaning?
C-h v TeX-expand-list RET
I suggest that you just prepend new items, instead of modifying the
whole value. Emacs will find the new prepended items first.
(add-to-list 'TeX-command-list '(...new.item...))
--
file-error; Data: (Opening input file no such file or directory ~/.signature)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-04-30 9:31 File variables in tex-site.el Ulrich Dirr
2003-04-30 14:34 ` Kai Großjohann
@ 2003-04-30 14:59 ` David Kastrup
2003-05-01 8:09 ` Ulrich Dirr
2003-05-01 10:00 ` Dr. F.C.Caner
2 siblings, 1 reply; 20+ messages in thread
From: David Kastrup @ 2003-04-30 14:59 UTC (permalink / raw)
"Ulrich Dirr" <ud@art-satz.de> writes:
> I'm wondering what all the file variables mean (%t, %f, %s, etc.).
> I would like to customize the list shown below. Where can I find an
> explanation what variables exist and what's their meaning?
>
> ;; The fpTeX commands.
> (setq TeX-command-list
> (list (list "TeX" "tex \\nonstopmode\\input %t" 'TeX-run-TeX nil t)
> (list "LaTeX" "%l \\nonstopmode\\input{%t}" 'TeX-run-LaTeX nil t)
> (list "LaTeX PDF" "pdflatex \\nonstopmode\\input{%t}" 'TeX-run-LaTeX
> nil t)
> (list "eLaTeX PDF" "pdfelatex \\nonstopmode\\input{%t}" 'TeX-run-LaTeX
> nil t)
> (list "View" "%v" 'TeX-run-command t nil)
> (list "View PS" "gsview32 %f" 'TeX-run-command t nil)
> (list "View PDF" "start %s.pdf" 'TeX-run-command t nil)
> (list "Print" "dvips %d" 'TeX-run-command t nil)
> (list "File" "dvips %d -o %f " 'TeX-run-command t nil)
> (list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil)
> (list "Index" "makeindex %s" 'TeX-run-command nil t)
> (list "Check" "lacheck %s" 'TeX-run-compile nil t)
> (list "Spell" "<ignored>" 'TeX-run-ispell-on-document nil nil)
> (list "Makeinfo" "makeinfo %t" 'TeX-run-compile nil t)
> (list "AmSTeX" "amstex \\nonstopmode\\input{%t}" 'TeX-run-TeX nil t)
> (list "Other" "" 'TeX-run-command t t)))
Oh shit. _That's_ the reason why your stuff does not work
intuitively with PDFLaTeX now. Please take a look at the settings of
this variable in tex.el, change fptex.el accordingly and submit a
patch. I am afraid that fptex.el has fallen behind times. Perhaps
one should let the code in fptex.el rather just modify those settings
in tex.el that are relevant. We need an fptex.el maintainer,
obviously. I don't think that any of the current developers of
AUCTeX actually uses Windows.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-04-30 14:59 ` David Kastrup
@ 2003-05-01 8:09 ` Ulrich Dirr
2003-05-01 9:26 ` David Kastrup
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Ulrich Dirr @ 2003-05-01 8:09 UTC (permalink / raw)
David Kastrup wrote:
> "Ulrich Dirr" <ud@art-satz.de> writes:
>
>> I'm wondering what all the file variables mean (%t, %f, %s, etc.).
>> I would like to customize the list shown below. Where can I find an
>> explanation what variables exist and what's their meaning?
>>
>> ;; The fpTeX commands.
>> (setq TeX-command-list
>> (list (list "TeX" "tex \\nonstopmode\\input %t" 'TeX-run-TeX nil t)
>> (list "LaTeX" "%l \\nonstopmode\\input{%t}" 'TeX-run-LaTeX nil t)
>> (list "LaTeX PDF" "pdflatex \\nonstopmode\\input{%t}" 'TeX-run-LaTeX
>> nil t)
>> (list "eLaTeX PDF" "pdfelatex \\nonstopmode\\input{%t}"
>> 'TeX-run-LaTeX nil t)
>> (list "View" "%v" 'TeX-run-command t nil)
>> (list "View PS" "gsview32 %f" 'TeX-run-command t nil)
>> (list "View PDF" "start %s.pdf" 'TeX-run-command t nil)
>> (list "Print" "dvips %d" 'TeX-run-command t nil)
>> (list "File" "dvips %d -o %f " 'TeX-run-command t nil)
>> (list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil)
>> (list "Index" "makeindex %s" 'TeX-run-command nil t)
>> (list "Check" "lacheck %s" 'TeX-run-compile nil t)
>> (list "Spell" "<ignored>" 'TeX-run-ispell-on-document nil nil)
>> (list "Makeinfo" "makeinfo %t" 'TeX-run-compile nil t)
>> (list "AmSTeX" "amstex \\nonstopmode\\input{%t}" 'TeX-run-TeX nil t)
>> (list "Other" "" 'TeX-run-command t t)))
>
> Oh shit. _That's_ the reason why your stuff does not work
> intuitively with PDFLaTeX now. Please take a look at the settings of
> this variable in tex.el, change fptex.el accordingly and submit a
> patch. I am afraid that fptex.el has fallen behind times. Perhaps
> one should let the code in fptex.el rather just modify those settings
> in tex.el that are relevant. We need an fptex.el maintainer,
> obviously. I don't think that any of the current developers of
> AUCTeX actually uses Windows.
I looked at tex.el and changed, e.g.,
(list "eLaTeX PDF" "pdfelatex \"\\nonstopmode\\input{%t}\""
'TeX-run-TeX nil t)
accordingly. But I still don't understand what's the difference in
behavior (ok, now I'll save some keystrokes). I still have to type C-c
C-c after successfully compiling to view the file; getting 'Command:
(default View)'; changing it to 'View PDF'; RET; etc.
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?
Probably there's still something wrong, isn't it?
Best regards,
Ulrich Dirr
P.S. I don't think I'm the person who can change fptex.el correctly and
write a patch. I probably would make more errors than corrections ...
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-01 8:09 ` Ulrich Dirr
@ 2003-05-01 9:26 ` David Kastrup
2003-05-01 15:11 ` Piet van Oostrum
2003-05-01 22:47 ` Stefan Monnier
2 siblings, 0 replies; 20+ messages in thread
From: David Kastrup @ 2003-05-01 9:26 UTC (permalink / raw)
"Ulrich Dirr" <ud@art-satz.de> writes:
> David Kastrup wrote:
> > "Ulrich Dirr" <ud@art-satz.de> writes:
> >
> >> I'm wondering what all the file variables mean (%t, %f, %s, etc.).
> >> I would like to customize the list shown below. Where can I find an
> >> explanation what variables exist and what's their meaning?
> >>
> >> ;; The fpTeX commands.
> >> (setq TeX-command-list
> >
> > Oh shit. _That's_ the reason why your stuff does not work
> > intuitively with PDFLaTeX now. Please take a look at the settings of
> > this variable in tex.el, change fptex.el accordingly and submit a
> > patch. I am afraid that fptex.el has fallen behind times. Perhaps
> > one should let the code in fptex.el rather just modify those settings
> > in tex.el that are relevant. We need an fptex.el maintainer,
> > obviously. I don't think that any of the current developers of
> > AUCTeX actually uses Windows.
>
> I looked at tex.el and changed, e.g.,
> (list "eLaTeX PDF" "pdfelatex \"\\nonstopmode\\input{%t}\""
> 'TeX-run-TeX nil t)
> accordingly. But I still don't understand what's the difference in
> behavior (ok, now I'll save some keystrokes). I still have to type C-c
> C-c after successfully compiling to view the file; getting 'Command:
> (default View)'; changing it to 'View PDF'; RET; etc.
The main difference was to the View command: it views PDF per default
if you used PDFLaTeX for producing PDF.
> 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.
I think that is not possible with Acrobat Reader.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-01 8:09 ` Ulrich Dirr
2003-05-01 9:26 ` David Kastrup
@ 2003-05-01 15:11 ` Piet van Oostrum
2003-05-02 5:30 ` Ulrich Dirr
2003-05-01 22:47 ` Stefan Monnier
2 siblings, 1 reply; 20+ messages in thread
From: Piet van Oostrum @ 2003-05-01 15:11 UTC (permalink / raw)
>>>>> "Ulrich Dirr" <ud@art-satz.de> (UD) wrote:
UD> I looked at tex.el and changed, e.g.,
UD> (list "eLaTeX PDF" "pdfelatex \"\\nonstopmode\\input{%t}\""
UD> 'TeX-run-TeX nil t)
UD> accordingly. But I still don't understand what's the difference in
UD> behavior (ok, now I'll save some keystrokes). I still have to type C-c
UD> C-c after successfully compiling to view the file; getting 'Command:
UD> (default View)'; changing it to 'View PDF'; RET; etc.
The CVS version has support for this. (But this support has not yet been
propagated to fptex). Actually the View command itself determines what kind
of file was produced and can be parameterized to do the proper thing to
open the file. This still leaves the problem of letting Acrobat Reader
reopen the document.
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-01 15:11 ` Piet van Oostrum
@ 2003-05-02 5:30 ` Ulrich Dirr
2003-05-02 10:44 ` Piet van Oostrum
0 siblings, 1 reply; 20+ messages in thread
From: Ulrich Dirr @ 2003-05-02 5:30 UTC (permalink / raw)
Piet van Oostrum wrote:
> Actually the View command itself determines what kind of file was
> produced and can be parameterized to do the proper thing to open the
> file.
Could you please give me some concrete hints ('... can be
parameterized')?
Ulrich Dirr
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-02 5:30 ` Ulrich Dirr
@ 2003-05-02 10:44 ` Piet van Oostrum
2003-05-03 7:04 ` Ulrich Dirr
0 siblings, 1 reply; 20+ messages in thread
From: Piet van Oostrum @ 2003-05-02 10:44 UTC (permalink / raw)
>>>>> "Ulrich Dirr" <ud@art-satz.de> (UD) wrote:
UD> Piet van Oostrum wrote:
>> Actually the View command itself determines what kind of file was
>> produced and can be parameterized to do the proper thing to open the
>> file.
UD> Could you please give me some concrete hints ('... can be
UD> parameterized')?
(defcustom TeX-output-view-style
'(("^dvi$" ("^a5$" "^landscape$") "xdvi \"%d\" -paper a5r -s 4")
("^dvi$" "^a5$" "xdvi \"%d\" -paper a5")
("^dvi$" ("^landscape$" "^pstricks$\\|^psfrag$")
"dvips -t landscape -f \"%d\" | gv")
("^dvi$" "^landscape$" "xdvi \"%d\" -paper a4r -s 4")
("^dvi$" "^pstricks$\\|^psfrag$" "dvips -f \"%d\" | gv")
("^dvi$" "." "xdvi \"%d\"")
("^pdf$" "^landscape$" "xpdf -papertype a4r \"%o\"")
("^pdf$" "." "xpdf \"%o\"")
("^html?$" "." "netscape \"%o\""))
"List of output file extensions and view options.
So this tells that if you generated a .dvi file it views with xdvi, but if
you generated a .pdf file, it views with xpdf. And then as you can see it
is also parameterized with options and packages.
If you use LaTeX PDF rather than LaTeX it knows that the output file was
.pdf rather than .dvi.
Please note that this is still not fixed in stone, i.e. we might come up
with a more flexible and easier to use system if someone has a bright
idea. For example the options and packages now easily lead to a
combinatorial explosion. So an easier system to build up the commands from
parts might be preferable.
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-02 10:44 ` Piet van Oostrum
@ 2003-05-03 7:04 ` Ulrich Dirr
2003-05-03 9:01 ` David Kastrup
0 siblings, 1 reply; 20+ messages in thread
From: Ulrich Dirr @ 2003-05-03 7:04 UTC (permalink / raw)
Piet van Oostrum wrote:
>>>>>> "Ulrich Dirr" <ud@art-satz.de> (UD) wrote:
>
>> Piet van Oostrum wrote:
>>> Actually the View command itself determines what kind of file was
>>> produced and can be parameterized to do the proper thing to open the
>>> file.
>
>> Could you please give me some concrete hints ('... can be
>> parameterized')?
>
> (defcustom TeX-output-view-style
> '(("^dvi$" ("^a5$" "^landscape$") "xdvi \"%d\" -paper a5r -s 4")
> ("^dvi$" "^a5$" "xdvi \"%d\" -paper a5")
> ("^dvi$" ("^landscape$" "^pstricks$\\|^psfrag$")
> "dvips -t landscape -f \"%d\" | gv")
> ("^dvi$" "^landscape$" "xdvi \"%d\" -paper a4r -s 4")
> ("^dvi$" "^pstricks$\\|^psfrag$" "dvips -f \"%d\" | gv")
> ("^dvi$" "." "xdvi \"%d\"")
> ("^pdf$" "^landscape$" "xpdf -papertype a4r \"%o\"")
> ("^pdf$" "." "xpdf \"%o\"")
> ("^html?$" "." "netscape \"%o\""))
> "List of output file extensions and view options.
>
> So this tells that if you generated a .dvi file it views with xdvi,
> but if you generated a .pdf file, it views with xpdf. And then as you
> can see it is also parameterized with options and packages.
>
> If you use LaTeX PDF rather than LaTeX it knows that the output file
> was .pdf rather than .dvi.
>
> Please note that this is still not fixed in stone, i.e. we might come
> up with a more flexible and easier to use system if someone has a
> bright idea. For example the options and packages now easily lead to a
> combinatorial explosion. So an easier system to build up the commands
> from parts might be preferable.
Ah, ok I understand. One final stupid question. When I look at tex.el it
always seems that parenthesis aren't balanced (like above I would add a
third closing parenthesis).
Best regards,
Ulrich Dirr
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-03 7:04 ` Ulrich Dirr
@ 2003-05-03 9:01 ` David Kastrup
0 siblings, 0 replies; 20+ messages in thread
From: David Kastrup @ 2003-05-03 9:01 UTC (permalink / raw)
"Ulrich Dirr" <ud@art-satz.de> writes:
> Piet van Oostrum wrote:
> >>>>>> "Ulrich Dirr" <ud@art-satz.de> (UD) wrote:
> >
> >> Piet van Oostrum wrote:
> >>> Actually the View command itself determines what kind of file was
> >>> produced and can be parameterized to do the proper thing to open the
> >>> file.
> >
> >> Could you please give me some concrete hints ('... can be
> >> parameterized')?
> >
> > (defcustom TeX-output-view-style
> > '(("^dvi$" ("^a5$" "^landscape$") "xdvi \"%d\" -paper a5r -s 4")
> > ("^dvi$" "^a5$" "xdvi \"%d\" -paper a5")
> > ("^dvi$" ("^landscape$" "^pstricks$\\|^psfrag$")
> > "dvips -t landscape -f \"%d\" | gv")
> > ("^dvi$" "^landscape$" "xdvi \"%d\" -paper a4r -s 4")
> > ("^dvi$" "^pstricks$\\|^psfrag$" "dvips -f \"%d\" | gv")
> > ("^dvi$" "." "xdvi \"%d\"")
> > ("^pdf$" "^landscape$" "xpdf -papertype a4r \"%o\"")
> > ("^pdf$" "." "xpdf \"%o\"")
> > ("^html?$" "." "netscape \"%o\""))
> > "List of output file extensions and view options.
> >
>
> Ah, ok I understand. One final stupid question. When I look at tex.el it
> always seems that parenthesis aren't balanced (like above I would add a
> third closing parenthesis).
Not so impatient, youg whippersnapper. First let us finish the
documentation string. Then let us declare the type and other
customiziation parameters of the customized variable. And then we
will be ready for closing the parenthesis on that one.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-01 8:09 ` Ulrich Dirr
2003-05-01 9:26 ` David Kastrup
2003-05-01 15:11 ` Piet van Oostrum
@ 2003-05-01 22:47 ` Stefan Monnier
2 siblings, 0 replies; 20+ messages in thread
From: Stefan Monnier @ 2003-05-01 22:47 UTC (permalink / raw)
>>>>> "Ulrich" == Ulrich Dirr <ud@art-satz.de> writes:
> 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?
Maybe you simply want to switch from acrobat to gv ?
I know that gv is not always as good at viewing PDF as acrobat is, but it
deals much better with the problem of refreshing the screen when the
PDF is changed (it does it automatically).
Stefan
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-04-30 9:31 File variables in tex-site.el Ulrich Dirr
2003-04-30 14:34 ` Kai Großjohann
2003-04-30 14:59 ` David Kastrup
@ 2003-05-01 10:00 ` Dr. F.C.Caner
2003-05-02 13:07 ` Matthias Rempe
2 siblings, 1 reply; 20+ messages in thread
From: Dr. F.C.Caner @ 2003-05-01 10:00 UTC (permalink / raw)
"Ulrich Dirr" <ud@art-satz.de> wrote in message news:b8qko3$hsr$1@online.de...
>
> 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. I
think, on the other hand, a small Windows program in C++ may be
written, which Emacs can be instructed to call right before compiling
the LaTeX file using LaTeX Pdf.
Can it be coded in elisp?
FCC
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-01 10:00 ` Dr. F.C.Caner
@ 2003-05-02 13:07 ` Matthias Rempe
2003-05-05 8:36 ` Dr. F.C.Caner
0 siblings, 1 reply; 20+ messages in thread
From: Matthias Rempe @ 2003-05-02 13:07 UTC (permalink / raw)
>>>>> "FCC" == F C Caner <ferhun_caner@yahoo.com> writes:
> "Ulrich Dirr" <ud@art-satz.de> wrote in message
> news:b8qko3$hsr$1@online.de...
>>
>> 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)
`----
--
Matthias
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-02 13:07 ` Matthias Rempe
@ 2003-05-05 8:36 ` Dr. F.C.Caner
2003-05-05 22:30 ` Matthias Rempe
2003-05-05 23:01 ` Jesper Harder
0 siblings, 2 replies; 20+ messages in thread
From: Dr. F.C.Caner @ 2003-05-05 8:36 UTC (permalink / raw)
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?
Thanks,
FCC.
> 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)
> `----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-05 8:36 ` Dr. F.C.Caner
@ 2003-05-05 22:30 ` Matthias Rempe
2003-05-05 23:01 ` Jesper Harder
1 sibling, 0 replies; 20+ messages in thread
From: Matthias Rempe @ 2003-05-05 22:30 UTC (permalink / raw)
>>>>> "FCC" == F C Caner <ferhun_caner@yahoo.com> 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?
Sorry, no. However, these tests work in the *scratch* buffer:
* eval (get-buffer-create " *ddeclient*")
This produced '#<buffer *ddeclient*>' in the *Message*
buffer. Since " *ddeclient*" contains a leading blank, it is not
shown in the *Buffer List*. Try C-x b, then space, *, dde, tab
--> this should show you the buffer.
* open a file in Acroread
* eval the (save-excursion ...) or eval (defun acrobat-close-all-docs
...) and then eval (acrobat-close-all-docs)
--> Acroread should close the file.
What version of Emacs and which versions of Acrobat Reader are you
using? acrobat-close-all-dos worked for version 4 of Acrobat Reader
and works for version 5 for me.
--
Matthias
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-05 8:36 ` Dr. F.C.Caner
2003-05-05 22:30 ` Matthias Rempe
@ 2003-05-05 23:01 ` Jesper Harder
2003-05-06 5:41 ` Dr. F.C.Caner
1 sibling, 1 reply; 20+ messages in thread
From: Jesper Harder @ 2003-05-05 23:01 UTC (permalink / raw)
ferhun_caner@yahoo.com (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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-05 23:01 ` Jesper Harder
@ 2003-05-06 5:41 ` Dr. F.C.Caner
2003-05-07 11:28 ` Dr. F.C.Caner
0 siblings, 1 reply; 20+ messages in thread
From: Dr. F.C.Caner @ 2003-05-06 5:41 UTC (permalink / raw)
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 <harder@myrealbox.com> wrote in message news:<m3he89vvzv.fsf@defun.localdomain>...
> ferhun_caner@yahoo.com (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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-06 5:41 ` Dr. F.C.Caner
@ 2003-05-07 11:28 ` Dr. F.C.Caner
2003-05-07 16:45 ` Matthias Rempe
0 siblings, 1 reply; 20+ messages in thread
From: Dr. F.C.Caner @ 2003-05-07 11:28 UTC (permalink / raw)
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)
)
ferhun_caner@yahoo.com (Dr. F.C.Caner) wrote in message news:<65fef11f.0305052141.298c20fe@posting.google.com>...
> 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 <harder@myrealbox.com> wrote in message news:<m3he89vvzv.fsf@defun.localdomain>...
> > ferhun_caner@yahoo.com (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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-07 11:28 ` Dr. F.C.Caner
@ 2003-05-07 16:45 ` Matthias Rempe
2003-05-08 6:00 ` Dr. F.C.Caner
0 siblings, 1 reply; 20+ messages in thread
From: Matthias Rempe @ 2003-05-07 16:45 UTC (permalink / raw)
>>>>> "FFC" == F C Caner <ferhun_caner@yahoo.com> writes:
> In the subsequent compilations the Reader will
> automatically redisplay the resulting pdf file (like the dvi
> viewers).
Sounds good. However, I only get a message "file not found" from
Acrobat Reader. It seems to me that acrobat-open-doc needs to wait
until TeX-run-LaTeX is finished and actually does not do it. Any
hints?
Versions:
Acrobat Reader: 5.1.0 17.09.2002
Emacs: GNU Emacs 21.3.50.1 (i386-mingw-nt5.0.2195)
of 2003-03-31 on ISMN3677
Windows: Win2K
,----
| (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)
| )
`----
--
Matthias
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: File variables in tex-site.el
2003-05-07 16:45 ` Matthias Rempe
@ 2003-05-08 6:00 ` Dr. F.C.Caner
0 siblings, 0 replies; 20+ messages in thread
From: Dr. F.C.Caner @ 2003-05-08 6:00 UTC (permalink / raw)
Yes, I encountered the same problem. The crudest way of solving it is
to insert
(sleep-for 10)
right before (acrobat-open-doc file). This would delay the execution
of acrobat-open-doc for 10 seconds, by which time LaTeXing the
document would be done already.
There must be a smarter way to do this, like using the variable
compilation-in-process. That I should find out :).
Best,
FCC.
Matthias Rempe <mhrempe@web.de> wrote in message news:<uwuh2k8n2.fsf@rempe-online.de>...
> >>>>> "FFC" == F C Caner <ferhun_caner@yahoo.com> writes:
>
> > In the subsequent compilations the Reader will
> > automatically redisplay the resulting pdf file (like the dvi
> > viewers).
>
> Sounds good. However, I only get a message "file not found" from
> Acrobat Reader. It seems to me that acrobat-open-doc needs to wait
> until TeX-run-LaTeX is finished and actually does not do it. Any
> hints?
>
>
> Versions:
> Acrobat Reader: 5.1.0 17.09.2002
> Emacs: GNU Emacs 21.3.50.1 (i386-mingw-nt5.0.2195)
> of 2003-03-31 on ISMN3677
> Windows: Win2K
>
> ,----
> | (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)
> | )
> `----
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2003-05-08 6:00 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-30 9:31 File variables in tex-site.el Ulrich Dirr
2003-04-30 14:34 ` Kai Großjohann
2003-04-30 14:59 ` David Kastrup
2003-05-01 8:09 ` Ulrich Dirr
2003-05-01 9:26 ` David Kastrup
2003-05-01 15:11 ` Piet van Oostrum
2003-05-02 5:30 ` Ulrich Dirr
2003-05-02 10:44 ` Piet van Oostrum
2003-05-03 7:04 ` Ulrich Dirr
2003-05-03 9:01 ` David Kastrup
2003-05-01 22:47 ` Stefan Monnier
2003-05-01 10:00 ` Dr. F.C.Caner
2003-05-02 13:07 ` Matthias Rempe
2003-05-05 8:36 ` Dr. F.C.Caner
2003-05-05 22:30 ` Matthias Rempe
2003-05-05 23:01 ` Jesper Harder
2003-05-06 5:41 ` Dr. F.C.Caner
2003-05-07 11:28 ` Dr. F.C.Caner
2003-05-07 16:45 ` Matthias Rempe
2003-05-08 6:00 ` Dr. F.C.Caner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).