[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] emaxima environments ($, language-specific indentation)

From: Tassilo Horn
Subject: Re: [AUCTeX] emaxima environments ($, language-specific indentation)
Date: Fri, 07 Mar 2014 11:11:54 +0100
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux)

Tamas Papp <address@hidden> 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'.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]