auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] a LaTeX-env-usepackage environment


From: Carlos
Subject: Re: [AUCTeX-devel] a LaTeX-env-usepackage environment
Date: Fri, 14 Feb 2014 09:34:11 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>Yes, but without a \documentclass you can't have a document environment,
>so this is a special case.

How did I know, that that was going to be the sort of answer to justify
it?  Hehehe, But yes, you are right Tassilo. 

I could argue that no one
would dare to compile an acceptable LaTeX document, unless usepackage is
invoked,  and I probably would be right in that respect, and, in
retrospect, that fact, would treat usepackage, no less special than
documentclass, thus its inclusion in latex.el, as an environment, is
somehow warranted. 
But the problem with this conclusion and why I'm wrong, is that the inference
was deduced from documentclass, and its special status, does not make it
less wrong either, for it is not an environment in the first place, and,
as you probably know, this could be verified, by removing the entire 

  (defun LaTeX-env-document (&optional ignore)
  "Create new LaTeX document.
  The compatibility argument IGNORE is ignored."
  (TeX-insert-macro "documentclass")
  (LaTeX-newline)
  (LaTeX-newline)
  (LaTeX-newline)
  (end-of-line 0)
  (LaTeX-insert-environment "document")
  (run-hooks 'LaTeX-document-style-hook)
  (setq LaTeX-document-style-hook nil))

in latex.el, and see for yourself, that it has no effect, in inserting the
rest of the environments. 

Of course, begin{document} and end{document} would have to be manually
tweaked in.

Have a good one Tassilo. Take care. 












without the
need to have the above in latex.el. 
is  problem with this conclusion and why I'm wrong, is that by
inferring, that it ought to be included, does not validate usepackage, 
as an environment either, because of the
inference that documentclass is included in it, since the latter is just
, just by the which might warrant its inclusion in latex.el, but that
alone, would not validate the  




reply via email to

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