auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Indent custom env like itemize/enumerate environment


From: Arash Esbati
Subject: Re: [AUCTeX] Indent custom env like itemize/enumerate environment
Date: Mon, 05 Jun 2017 21:03:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2

Thorsten Grothe <address@hidden> writes:

> I'm working with a custom env which looks like this:
>
> \begin{multi}[]{}
> bla bla
>
> \item bla
> \item bla
> \item* bla
> \end{multi}
>
> When I indent it with LaTeX-fill-environment it looks like this:
>
> \begin{multi}[]{}
>    bla bla
>
>  \item bla --> wrong indention here!
>  \item bla --> wrong indention here!
>  \item* bla --> wrong indention here!
> \end{multi}
>
> I guess it's because auctex does not know that this env belongs to
> itemize/enumerate envs and cannot fill it accordingly. How can I fix
> this and add \begin{multi} ... \end{multi} so it get's properly indented
> like itemize/enumerate lists?

Hi Thorsten,

you can tell AUCTeX about your environment with these 2 lines:

    (LaTeX-add-environments '("multi" LaTeX-env-item))
    (add-to-list 'LaTeX-item-list '("multi" . LaTeX-item-argument))

The question is where to put these 2 lines, there are some options (and
.emacs is not my first choice).  How do you define this environment?

Best, Arash



reply via email to

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