[Top][All Lists]

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

Re: [AUCTeX-devel] Math minor mode for all AUCTeX modes

From: Ralf Angeli
Subject: Re: [AUCTeX-devel] Math minor mode for all AUCTeX modes
Date: Sat, 10 Feb 2007 18:19:25 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

* David Kastrup (2007-02-08) writes:

> Ralf Angeli <address@hidden> writes:
>> Is there a reason LaTeX Math mode is specific to LaTeX mode?  There
>> must be at least a common set of macros for plain TeX, LaTeX, probably
>> also ConTeXt and to some extent Texinfo.  Shouldn't we provide a math
>> minor mode for all of those major modes?
> Well, and AMSTeX-mode (should be pretty close to plain+AMSmath).
> Differences are probably small: plain TeX uses {a\over b} instead of
> \frac{a}{b}, and {a\choose b} instead of \binom{a}{b} (which is only
> available with AMSLaTeX, anyway).

BTW, \frac is one of the few math macros which can be inserted with
`C-c RET'.  Probably because of it accepting two arguments.  It's a
bit bewildering that many macros from `LaTeX-math-default' are only
available through the menu, i.e. there is no tab completion.

>> The reason I'm asking this is that the last change to tex-fold.el
>> broke folding for all modes but LaTeX mode because the file
>> evaluates `LaTeX-math-default' when being loaded.  I don't really
>> want to require latex.el to fix that.  A better way out of this
>> would be to make tex-fold.el more aware of differences between
>> AUCTeX modes and use specific macro sets per mode.
> Should be doable.

tex-fold.el will now use the content of <mode-prefix>-fold-*-spec-list
variables if defined.  These variables can contain mode-specific
macros, math macros or environments to be folded.  I've currently only
defined special variables for LaTeX mode and haven't documented the
feature yet because I want to see how it evolves.

The variable `LaTeX-fold-math-spec-list' is now used for making the
macros defined in `LaTeX-math-default' available to tex-fold.el.

Next steps would now be to sort out which math macros are relevant for
which modes and dissect `LaTeX-math-default' accordingly into other
mode-specific variables.  The macros in those variables could then be
used to construct the menus of a general TeX Math minor mode as well
as to make them available for insertion with `C-c RET'.


reply via email to

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