Cody Chan <cody.chan...@gmail.com> writes: > So, how can I indent the tex file (just using **TAB** and **ENTER** > keys when editing it or indent the whole buffer using **TAB** or > indent command)?
You can't do that. One reason that cannot be done is that nothing stops you to define your own \mysection{Foo bar baz} macro which just emits \section[Foo...]{Foo bar baz}, but how could AUCTeX know that for producing the right indentation. AUCTeX does indent in nested structures, e.g., when you put an itemize environment in an enumerate environment, that will be indented, or when you have nesting in terms of {...}. > I mean, every block (section, subsection, **EVERY** `\begin{}...\end{}` > pair no matter what is inside the {}) should be a part and should be in its > place related to its parent? Please note that this wouldn't be possible, or rather not produce the desired output, with some verbatim environments, e.g., with --8<---------------cut here---------------start------------->8--- \part{Foo} \chapter{Bar} \section{Baz} \subsection{Quux} \paragraph{Quexl} \subparagraph{Bla} \begin{verbatim} this stuff has 14 spaces in front even in the compiled output \end{verbatim} --8<---------------cut here---------------end--------------->8--- the verbatim text will also have 14 spaces in front of it in the compiled PDF output, because well, verbatim means put the stuff in there just as I've typed it. I guess you don't want that, and you'd need to write --8<---------------cut here---------------start------------->8--- \part{Foo} \chapter{Bar} \section{Baz} \subsection{Quux} \paragraph{Quexl} \subparagraph{Bla} \begin{verbatim} this stuff has 14 spaces in front even in the compiled output \end{verbatim} --8<---------------cut here---------------end--------------->8--- which pretty much defeats the purpose of the whole indentation ceremony. Bye, Tassilo _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel