auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] avoiding to have a synctex.gz file created in dvi mode


From: Ralf Angeli
Subject: Re: [AUCTeX] avoiding to have a synctex.gz file created in dvi mode
Date: Mon, 11 Jul 2011 17:05:43 +0200

* Rainer Thiel (2011-06-26) writes:

> I have recently configured auctex to support synctex by adding
> ("LaTeX" "%`%l -synctex=1 %(mode)%' %t" TeX-run-TeX nil (latex-mode
> doctex-mode) :help "Run LaTeX") in TeX-command-list.  Thus, LaTeX
> creates a [jobname].synctex.gz file each time it is running.  This is
> what I want when I run LaTeX in TeX-PDF-mode.  On the other hand, when
> TeX-PDF-mode is disabled, because it should create dvi-Files, the
> synctex.gz file is (slightly) disturbing.
>
> How can I suppress having LaTeX create synctex.gz-files when it is
> supposed to create dvi-files?

If you don't hardcode the SyncTeX switch in `TeX-command-list' but
rather use `TeX-source-correlate-mode' you could connect it to the
activation of `TeX-PDF-mode'.  Then maybe something like this might
work:

(add-hook 'TeX-PDF-mode-hook
          (lambda () (TeX-source-correlate-mode (if TeX-PDF-mode 1 0))))

I say "might" because I haven't tested it very thoroughly. (c:

-- 
Ralf



reply via email to

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