2

I would like to use something like the Allman or BSD style for LaTeX. For example, I would indent the following code like this:

\iflanguage{english}{
    \begin{otherlanguage}{brazilian}
}{
    \begin{otherlanguage}{english}
}

But AUCTeX indents it like this:

\iflanguage{english}{
  \begin{otherlanguage}{brazilian}
    }{
      \begin{otherlanguage}{english}
        }

This question is similar, but the solution does not work since LaTeX is not C-like.

This page describes the variable 'TeX-brace-indent-level', but it controls only {. Does the same exist for }?

Community
  • 1
  • 1
mgmillani
  • 127
  • 9
  • I'm surprised AUCTeX wpould indent it this way. FWIW, the built-in latex-mode indents pretty much just like you want. – Stefan Nov 22 '14 at 16:43
  • @Stefan I just realized that the problem is with the '\begin' inside: the '{' are indented as if they were part of '\begin{otherlanguage}'. – mgmillani Nov 23 '14 at 14:17

0 Answers0