[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] which TeX-run-* function to use with latexmk
From: |
Joe Wells |
Subject: |
[AUCTeX-devel] which TeX-run-* function to use with latexmk |
Date: |
Mon, 17 Sep 2007 14:47:04 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Dear AUCTeX gurus,
I'm trying to figure out the correct way to hook the “latexmk” program
into AUCTeX's system for invoking processing commands on TeX files.
So I have to figure out how to add values to and/or modify
TeX-command-list.
This leads to the question of which function to use in the 3rd slot of
an element of TeX-command-list.
A number of possibilities are available: TeX-run-command,
TeX-run-format, TeX-run-TeX, TeX-run-interactive, TeX-run-BibTeX,
TeX-run-compile, TeX-run-shell, TeX-run-discard, TeX-run-background,
TeX-run-silent.
>From the descriptions of them in the documentation string of
TeX-command-list and their function documentation strings, the only
one I can immediately rule out is TeX-run-discard.
So I've been reading through the code of these functions, and it is
not obvious which (if any) of them to use.
Let me explain a bit more about latexmk so that the difficulty will be
clear. As an example, I have a file “paper.tex”, and if I remove all
its auxiliary files and then run “latexmk paper.tex”, then latexmk
runs the following commands:
latex paper.tex
bibtex paper
latex paper.tex
bibtex paper
latex paper.tex
bibtex paper
latex paper.tex
bibtex paper
latex paper.tex
dvips paper.dvi -o paper.ps
ps2pdf paper.ps paper.pdf
(Because of my personal configurations of latexmk, this is actually a
simplification of what it does when I run this command. And yes, this
file really needs 4 runs of bibtex to work correctly.)
All of these steps are calculated automatically. To do this, latexmk
determines what files are being used as inputs by various methods
(including scanning the .log file) and checks whether files have
changed after each step by keeping MD5 signatures and comparing the
new signatures with the old signatures.
What are the implications of this for AUCTeX integration? The biggest
issue is that the output of latexmk will contain the output of many
invocations of latex, bibtex, dvips, ps2pdf, etc. All of the
functions I mentioned above seem to have built into their behavior the
assumption that at most one invocation of either latex or bibtex has
occurred. It is not clear whether they will “do the right thing” when
the output contains both LaTeX and BibTeX errors. It is also not
clear whether they will “do the right thing” when multiple runs of the
same program are included; for example they may not correctly report
whether dependencies have been resolved.
Any suggestions and/or advice?
I will be grateful for any help you can provide.
--
Thanks,
Joe
- [AUCTeX-devel] which TeX-run-* function to use with latexmk,
Joe Wells <=