Tamas Papp <[email protected]> writes:
Hi Tamas,
> 1. in Maxima code can be terminated with $ instead of ;, in which case
> the result is not displayed in the output. This confuses AUCTeX (code
> highlighting etc), because it thinks math mode has been started.
>
> A workaround is
> --8<---------------cut here---------------start------------->8---
> \begin{maxima}[]
> eq: a+1=2$ /* a maxima comment that closes the $ */
> \maximaoutput
> a + 1 = 2
> \end{maxima}
> --8<---------------cut here---------------end--------------->8---
>
> but this is cumbersome.
>
> I tried pushing "maxima" to LaTeX-verbatim-environments-local, and that
> fixes the highlighting issue, but then it disables indentation.
>
> 2. Is it possible to have Emacs apply different indentation/highligthing
> rules in an environment (or between two arbitrary strings)?
You can add maxima to `LaTeX-indent-environment-list' with a special
indentation function.
You can also add maxima to `font-latex-math-environments' so that its
content is fontified in the math face. However, that doesn't cure the
problem of a $ needed to be closed again.
So probably you can work your way by having maxima in
`LaTeX-verbatim-environments-local' with a custom indentation function
in `LaTeX-indent-environment-list'.
Bye,
Tassilo
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex