[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Including a default preamble in all documents
From: |
Mosè Giordano |
Subject: |
Re: [AUCTeX] Including a default preamble in all documents |
Date: |
Sat, 29 Jun 2013 20:31:33 +0200 |
Hi Jorge,
I suggest you not to redefine `TeX-arg-document' in your `.emacs', if
it will be changed you'll miss new features. If you want you can
submit a patch to improve AUCTeX ;-)
Without changing `TeX-arg-document', you can use `autoinsert`, see
(info "(autotype)Autoinserting").
Some weeks ago I submitted a patch to add support for document
templates, but there weren't replies:
http://lists.gnu.org/archive/html/auctex-devel/2013-05/msg00001.html
Bye,
Mosè
2013/6/29 Jorge A. Alfaro Murillo <address@hidden>:
> Hi.
>
> What is the best way to include a default preamble when I create a new
> document? I have some default packages and environment definitions
> that I always include in my LaTeX files.
>
> Currently I am defining a new variable LaTeX-default-preamble and
> modifying the function TeX-arg-document so that it includes:
>
> (if LaTeX-default-preamble
> (insert (concat "\n\n" LaTeX-default-preamble)))
>
> before it runs TeX-remove-style and the TeX-after-document-hook.
>
> Is there a better way to do this?
>
> Best,
>
> Jorge.
>
> _______________________________________________
> auctex mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/auctex