Gibson Kurt | 3 Jan 2010 21:22
Picon

AUCTeX indentation does not work

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.

All of the documentation on the web says that AUCTeX automatically  
indents LaTeX source.  Not only is that false, I cannot even get it  
to allow me to do it manually.

It does not even inherit the formatting or level of the prior  
section, etc.

I want it to indent something.  TAB will not indent anything.   
Changing the variable LaTeX-indent-line and LaTeX-indent-level seems  
to have no effect.  "M-x auto-fill-buffer" has no effect.

I have a mac with emacs 22.3 installed.  I cannot even find  
documentation to determine whether or not AUCTeX is even running.   
When I open a LaTeX document the minibuffer banner line says  
"[(PDFLaTeX/F Fill)]".  No mention of auctex.

The following is in the .emacs file:

(add-to-list 'load-path (expand-file-name "/sw/share/emacs22/site- 
lisp/auctex"))

;;; invoke the AUCTeX package (LaTeX support)
(require 'tex-site)
(setq TeX-auto-save t)
(Continue reading)

Gibson Kurt | 3 Jan 2010 22:05
Picon

Indentation does not work --- should subsections be indented?

Is AUCTeX supposed to indent subsections and the body text under the  
subsections?  If it is, it is not working for me.
Dirk Ullrich | 3 Jan 2010 22:08

Re: AUCTeX indentation does not work

Hi Kurt,

2010/1/3 Gibson Kurt <k.gibsonlawfirm <at> gmail.com>:
> 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.
>
> All of the documentation on the web says that AUCTeX automatically indents
> LaTeX source.  Not only is that false, I cannot even get it to allow me to
> do it manually.
>
> It does not even inherit the formatting or level of the prior section, etc.
>
> I want it to indent something.  TAB will not indent anything.  Changing the
> variable LaTeX-indent-line and LaTeX-indent-level seems to have no effect.
>  "M-x auto-fill-buffer" has no effect.
>
> I have a mac with emacs 22.3 installed.  I cannot even find documentation to
> determine whether or not AUCTeX is even running.  When I open a LaTeX
> document the minibuffer banner line says "[(PDFLaTeX/F Fill)]".  No mention
> of auctex
Let us start here: This looks like AUCTeX's LaTeX mode is used as
major mode. To verify this there are different ways: For instance you
should have a "LaTeX" menu point for Emacs when visiting a LaTeX
buffer using AUCTeX. If you see this menu and open it, there should be
some menu points at the bottom mentioning "AUCTeX". Otherwise AUXTeX
is not loaded.
>
(Continue reading)

Dirk Ullrich | 3 Jan 2010 22:12

Re: Indentation does not work --- should subsections be indented?

Hi Kurt,

2010/1/3 Gibson Kurt <k.gibsonlawfirm <at> gmail.com>:
> Is AUCTeX supposed to indent subsections and the body text under the
> subsections?  If it is, it is not working for me.
No, AUCTeX does neither indent subsection headers nor its text by
default. (This is normal (La)TeX behavior - it's not XML ;_) ...).

Dirk
Ralf Angeli | 3 Jan 2010 22:20

Re: AUCTeX indentation does not work

* 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>'.

(Continue reading)

Kurt Gibson | 5 Jan 2010 19:28

Re: AUCTeX indentation does not work

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  <at>  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.

(Continue reading)

henry atting | 19 Jan 2010 08:35
Picon

command on master file

I have a master file which only contains the preamble, the text is
included with `\input{raw.tex}'
As AuCTeX keeps track of any changes in raw.tex I can run the LaTeX
command on the master file.

Probably my memory deceives me but I think to remember that I once did
it reverse. So, is it possible in some way to run a LaTeX command on the
file included and not on the master file (and, well, get the same
result)

henry

--

-- 
http://literaturlatenight.de
Longmin Wang | 19 Jan 2010 09:00
Picon

Re: command on master file

On Tue, Jan 19, 2010 at 08:35:42AM +0100, henry atting wrote:
>I have a master file which only contains the preamble, the text is
>included with `\input{raw.tex}'
>As AuCTeX keeps track of any changes in raw.tex I can run the LaTeX
>command on the master file.
>
>Probably my memory deceives me but I think to remember that I once did
>it reverse. So, is it possible in some way to run a LaTeX command on the
>file included and not on the master file (and, well, get the same
>result)

You may insert the following
    %%% Local Variables:
    %%% TeX-master: "name of main file"
    %%% End:
at the end of raw.tex. 

--

-- 
Longmin Wang <longminwang <at> gmail.com>
Math. Dept., Nankai Univ., China
http://math.nankai.edu.cn/~wanglm/
GnuPG-Key ID: 1024D/2A5CFA5C
Fingerprint: 8587 1246 3AAD C185 D419  ADF1 B620 D8B8 2A5C FA5C
henry atting | 19 Jan 2010 17:08
Picon

Re: command on master file

On Di, Jan 19 2010, Longmin Wang wrote:

> On Tue, Jan 19, 2010 at 08:35:42AM +0100, henry atting wrote:
>>I have a master file which only contains the preamble, the text is
>>included with `\input{raw.tex}'
>>As AuCTeX keeps track of any changes in raw.tex I can run the LaTeX
>>command on the master file.
>>
>>Probably my memory deceives me but I think to remember that I once did
>>it reverse. So, is it possible in some way to run a LaTeX command on the
>>file included and not on the master file (and, well, get the same
>>result)
>
> You may insert the following
>     %%% Local Variables:
>     %%% TeX-master: "name of main file"
>     %%% End:
> at the end of raw.tex. 

Indeed these lines were already at the end of raw.tex, but because of a
missing `:' after `End' the LaTeX command failed.

Many thanks
henry

--

-- 
http://literaturlatenight.de
Pjotr Kourzanov | 19 Jan 2010 16:09
Picon
Picon
Favicon

Usage of Auctex in conjunction with Noweb and Preview

Dear users and developers of Auctex,

  First of all, thanks a lot for a great tool that gave me a lot of 
pleasant surprises!

  In short, I am trying to use the Preview feature with Emacs 22 in 
conjunction with Noweb (a literate programming system), and I don't get 
any previews in the .nw file. I know the issue has surfaced before in 
the context of statistical software, but the solutions don't appear to
work for me, so I'd like to ask for your advice on these mailing lists.

  The setup is standard: I have test.nw with this the at the end:

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% LaTeX-command: "nolatex"
%%% End:

  The Auctex in general just works with this .nw file, when the cursor 
is in a Documentation chunk (some settings are reset when I leave to a 
Code chunk and return back to a Documentation chunk later, as reported 
earlier), including Folding, keyboard binding etc. However, when I 
enable previews for the whole document, they appear only in .nw.tex and 
in main.tex buffers and not in the .nw buffer.

  Noweb processes test.nw and generates test.nw.tex while the main.tex 
does an \include{test.nw} (I have also  tried with \input test.nw), 
relying on LaTeX to automatically append .tex to arrive at test.nw.tex.

(Continue reading)


Gmane