[Top][All Lists]

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

Re: [Bug-AUCTeX] rel-0-9-1; Two speed issues

From: David Kastrup
Subject: Re: [Bug-AUCTeX] rel-0-9-1; Two speed issues
Date: Thu, 19 May 2005 23:00:06 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Stubner <address@hidden> writes:

> David Kastrup wrote:
>> Ralf Stubner <address@hidden> writes:
>>> I haven't found a possibility yet to have those play nicely
>>> together with preview-latex.
>> Where is the problem?  Just use one empfile (?) environment per
>> graphic.
> That works fine for emp.sty, where I have only a few graphs. The
> problem ist feynmp.sty, where I currently have ~80 graphs within
> something like 30 or 40 displayed equations (still increasing). At
> least at the moment I find it more practical to have one 'fmffile'
> per file in a multi-file document and make occasional preview-latex
> runs on the whole buffer.

Well, one possible remedy would be to place the fmffile stuff _around_
\begin{document}...\end{document}.  Then it should be active on each
run.  No idea whether this will do more harm than good though, and
you'd quite probably need to use METAPOST on every run if you hope to
achieve anything close to consistency (not sure how the "counters"
option might interact here.  If you use that, you probably should
_not_ run METAPOST when regenerating regions).

There are also regular expressions to tell AUCTeX what to include in
every region compilation, and those expressions usually take
everything outside of \begin{document} and \end{document}.

Those are in TeX-header-end and TeX-trailer-start.  You could adjust
them to include the file writing code from feynmp.

>>> BTW, is it possible to call latex with -shell-escape' on a case by
>>> case basis from within AUCTeX, similar to source specials or PDF
>>> mode?
>> % Local Variables:
>> % LaTeX-command: "latex -shell-escape"
> Thanks, that helps. Really nice would be a possibility to switch
> between enabeling '-shell-escape' or not, since I don't want
> MetaPost to process the files, even if nothing has changed.

Well, choose a keyboard binding and write a toggle for it.  About 5
lines of Lisp code, something like

(defun TeX-toggle-escape nil (interactive)
  (if (string= LaTeX-command "latex") "latex -shell-escape" "latex"))

(add-hook 'LaTeX-mode-hook
  (lambda nil
    (define-key LaTeX-mode-map "\C-c\C-t\C-x" 'TeX-toggle-escape)))

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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