Yet another question about indentation in AUCTeX...
I would like to be able to indent content inside square brackets [...]
. It would be useful for tikz option lists, for example, or trees drawn using forest
or qtree
: both these packages use square brackets for their syntax, which makes it easy to scan in source code in an editor supporting paren-indentation.
Unfortunately, AUCTeX only indents the content of environments and content between braces {...}
.
The forest
example is also a situation where cheating by adding braces around the content we want indented won't work, because braces will escape all content from being evaluated as a tree.
Example:
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
[A
[B]
[C
[D]
[E]
]
]
\end{forest}
\end{document}
Which I would like indented as:
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
[A
[B]
[C
[D]
[E]
]
]
\end{forest}
\end{document}
Is there a way?