[Top][All Lists]

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

[AUCTeX] Re: default TeX-PDF-mode in Auctex

From: Ralf Angeli
Subject: [AUCTeX] Re: default TeX-PDF-mode in Auctex
Date: Tue, 03 Jan 2006 10:56:15 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

* jlr 0 (2006-01-03) writes:

> Since I'd like all my .tex and .ltx files to open in TeX-PDF mode,
> this is what I have placed in my init file.
> ,----
> | (add-hook 'LaTeX-mode-hook
> |             '(lambda ()
> |                  (setq TeX-master 'dwim)
> |                       (TeX-PDF-mode-on)
> |                            ))
> | (add-hook 'plain-tex-mode-hook
> |             'latex-mode)

You want LaTeX mode even for plain TeX files?  That's a strange wish.

> However, when opening a new .ltx file (C-x C-f), I'm asked about the
> master file but no local variable is ever put at the end of the
> file.
> 1. How can I have the local variable show (a) the right mode, as
> well as the (b) `TeX-master" file when opening a .ltx file?

,----[ (info "(auctex)Multifile") ]
|  -- User Option: TeX-one-master
|      Regular expression matching ordinary TeX files.
|      You should set this variable to match the name of all files, for
|      which it is a good idea to append a `TeX-master' file variable
|      entry automatically.  When AUCTeX adds the name of the master file
|      as a file variable, it does not need to ask next time you edit the
|      file.

> 2. Besides, in order to always have TeX/LaTeX file in TeX-PDF mode
> shouldn't the local variables read like this instead?
> ,----
> | %%% Local Variables: 
> | %%% mode: TeX-PDF
> | %%% TeX-master: t
> | %%% End: 
> `----

TeX-PDF-mode is a minor mode and you can set its default value
e.g. with `M-x customize-variable RET TeX-PDF-mode RET'.  In contrast,
the "mode:" entry in the local variables section AUCTeX inserts is
concerned with the major mode.

> 3. In that case, opening such a file leads to toggling TeX-PDF-mode
> to off and the buffer is in plain latex-mode.  How is that?

"mode:" entries always toggle the mode they are referring to.  If you
activated TeX-PDF-mode per default, the "mode:" entry above will
deactivate it.


reply via email to

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