I use Emacs in conjunction with AucTeX (Ubuntu 10.04 works, if that matters).
Does anyone know if there is a way to automatically include the LaTeX source-mathematical mode (secondary AucTeX mode), if the point is in any medium of mathematics (ie $...$, a $$...$$, begin{equation}...\end{equation},, etc.)?
$...$
$$...$$
begin{equation}...\end{equation}
I assume that there is a relatively simple answer, since syntax highlighting uses the same criteria for coloring mathematical material, but I could not find anything.
andre-r , , ` . LaTeX-math-mode .
`
LaTeX-math-mode
(defun LaTeX-maybe-math () "If in math mode, act as a prefix key for `LaTeX-math-keymap'. Otherwise act as `self-insert-command'." (interactive) (if (texmathp) (let* ((events (let ((overriding-local-map LaTeX-math-keymap)) (read-key-sequence "math: "))) (binding (lookup-key LaTeX-math-keymap events))) (call-interactively binding)) (call-interactively 'self-insert-command))) (define-key LaTeX-mode-map "`" 'LaTeX-maybe-math)
:
.
( ).
, .
, C-h f1.
C-h
f1
LaTeX-math-mode - " ". ( , , , , `A get\forall.) , , .
, :
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
IMHO , : `` get `, , `, LaTeX-math-abbrev-prefix.
LaTeX-math-abbrev-prefix