I'm using autosnippets are restricted to math mode. This works fine for the most part, except that if I'm writing some math like \(a_{b}\) the syntax tree is broken at \(a_\).
When I end the math environment on a _, it is no longer recognized as such at my snippets break. The same happens for ^, which is quite unfortunate as I have __ and ^^ as snippets that should expand to _{} and ^{}, but only in math environments.
This doesn't happen if I put a character behind _, like \(a_ b\). Then the math environment isn't broken and my snippet expands just fine.
I'm using autosnippets are restricted to math mode. This works fine for the most part, except that if I'm writing some math like
\(a_{b}\)
the syntax tree is broken at\(a_\)
. When I end the math environment on a_
, it is no longer recognized as such at my snippets break. The same happens for^
, which is quite unfortunate as I have__
and^^
as snippets that should expand to_{}
and^{}
, but only in math environments.This doesn't happen if I put a character behind
_
, like\(a_ b\)
. Then the math environment isn't broken and my snippet expands just fine.