|
From: | Kurt Gibson |
Subject: | Re: [AUCTeX] AUCTeX indentation does not work |
Date: | Tue, 5 Jan 2010 13:28:05 -0500 |
Dirk and Ralf:Thanks for the help. I am getting it ... sort of. I like the indentation features of Textwrangler (macos) (GUI) and I want the features of outline mode AUCTeX. Perhaps I do not need the indentation features because the outline-collapsing features of AUCTeX with outline-minor-mode lets me easily see my document structure.
Two questions.First: In normal outline mode, you can issue the command to collapse to a certain levels, eg collapse all headers except for the top 2 levels. Can this be done in AUCTeX with outline minor mode? In outline mode, I thought it was c-u 2 c-c c-q for the top two levels. In AUCTeX with outline minor mode, c-c c-q is undefined. c-c @ c-t (hide-body) apparently does not accept arguments.
Second: M-x hide-body produces: \begin{document}... \section{section1}... \subsection{subsection1.1}... \section{section2}... \subsection{subsection2.1}... \section{section3}... \subsection{subsection3.1}... \end{document}... The following is easier to read. begin{document}... \section{section1}... \subsection{subsection1.1}... \section{section2}... \subsection{subsection2.1}... \section{section3}... \subsection{subsection3.1}... \end{document}Can this be done easily without writing a lisp program (which I cannot do)?
Kurt On 2010 Jan 03, at 18:25:59, Gibson Kurt wrote:
Ralf: BTW, emacs C-h v LaTeX-indent-level reports the following:LaTeX-indent-level is a variable defined in `/sw/share/emacs22/site- lisp/auctex/latex.elc'.Its value is 2 Documentation: *Indentation of begin-end blocks in LaTeX. You can customize this variable. -------- Therefore, it appears to be set to the default. Kurt On 2010 Jan 03, at 16:20:00, Ralf Angeli wrote:* 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) -- Ralf
[Prev in Thread] | Current Thread | [Next in Thread] |