[Top][All Lists]

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

Re: [AUCTeX] AUCTeX indentation does not work

From: Ralf Angeli
Subject: Re: [AUCTeX] AUCTeX indentation does not work
Date: Sun, 03 Jan 2010 22:20:00 +0100

* Gibson Kurt (2010-01-03) writes:

> I am new to AUCTeX and after several hours of research cannot get it  
> to indent paragraphs on my system.  It is worthless if it will not  
> indent for me.  What purpose does it serve if it will not even allow  
> someone to indent code manually?  TAB does not even work so I could  
> not even use it to indent manually.

Your understanding of "indentation" likely differs from the semantics
associated with it in the context of Emacs (especially programming
modes) and therefore also AUCTeX.  Here it refers to the insertion of
whitespace at the beginning of one or more lines and (now comes the
important part) the amount of whitespace is determined according to
syntactic structures.  So typing <TAB> will indent according to those
structures and not just insert a tab character.

Here is the respective information from the AUCTeX manual:

,----[ (info "(auctex)Indenting") ]
|    Indentation is done by LaTeX environments and by TeX groups, that is
| the body of an environment is indented by the value of
| `LaTeX-indent-level' (default 2).

So it will only add whitespace if your text is in a TeX group,
i.e. {...}, or an environment, i.e. \begin{<env>}...\end{<env>} (with
the exception of the document environment).

If you want to add a literal tab character, you can use `C-q <TAB>'.

More info on indentation can also be found in the Emacs manual. (See
(info "(emacs)Indentation") <-- Type `C-x C-e' here)


reply via email to

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