Stefano Lodi <[email protected]> writes:

Hi Stefano,

> How can I configure auc-tex to get the following indentation?
>
> \begin{itemize}
>   \item This is the first item in my list, 
>     with a pretty useless text in it
>
> My goal is to make my LaTeX sources compatible with other editors,
> notably WinEdt, which by default indent this way.

Change the WinEdt default indent.  It is wrong!1!! ;-)

Fun aside, this works for me:

--8<---------------cut here---------------start------------->8---
(defun my-LaTeX-indent-itemize ()
  (destructuring-bind (beg-pos . beg-col)
      (LaTeX-env-beginning-pos-col)
    (cond ((looking-at "\\\\end{itemize}")
           beg-col)

          ((looking-at "\\\\item")
           (+ 2 beg-col))

          (t (+ 4 beg-col)))))

(add-to-list 'LaTeX-indent-environment-list
             '("itemize" my-LaTeX-indent-itemize))
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo


_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to