This question is related to how to detect if inside a LaTeX math environment?.
How to do the correct settings in .emacs in such a way that the variable texmathp takes the value t (like in math formulae) when the cursor is at the following commands?
\newpage ;command for creating a new page \label{blabla} \cite{blabla} \ref{blabla} \footnote{blabla} \section{blabla} \chapter{blabla} \\ ;command for creating a new line In the answer it was mentioned that one can use texmathp-tex-commands to achieve such things. Let me ask how to do it for the above formulae.
TeX-current-macroreturns the name of the current macro point is on, is it what you need?texmathpfor math formulae). T. Verron says in that answer that one can do such things withtexmathpby adding new values totexmathp-tex-commands. I just want to see how to do it.TeX-current-macrois non-nil otherwise printing "Outside LaTeX environment").