[Top][All Lists]

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

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

From: Tamas Papp
Subject: [AUCTeX] emaxima environments ($, language-specific indentation)
Date: Fri, 07 Mar 2014 10:07:56 +0100
User-agent: mu4e; emacs 24.3.1


I am using the emaxima LaTeX package to mix LaTeX and Maxima (symbolic
algebra) code. The relevant LaTeX environment looks like this:

--8<---------------cut here---------------start------------->8---
  eq: a+1=2;
                                   a + 1 = 2
--8<---------------cut here---------------end--------------->8---

emaxima-mode is a small extension of AUCTeX that has some functions to
send the part between \begin{maxima}[] and \maximaoutput (if it exists,
if not the \end{maxima}) to an inferor maxima process and insert the
output into the bottom half of the environment. But otherwise the mode
is really AUCTeX mode, so this is probably the best place for me to get

I have two questions:

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---
  eq: a+1=2$ /* a maxima comment that closes the $ */
                                   a + 1 = 2
--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)?



reply via email to

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