|
|
|
@ -1121,11 +1121,17 @@ |
|
|
|
(interactive "P") |
|
|
|
(interactive "P") |
|
|
|
(if arg |
|
|
|
(if arg |
|
|
|
(LaTeX-insert-environment "align") |
|
|
|
(LaTeX-insert-environment "align") |
|
|
|
(LaTeX-insert-environment "align*"))) |
|
|
|
(LaTeX-insert-environment "align*")) |
|
|
|
|
|
|
|
(indent-according-to-mode)) |
|
|
|
|
|
|
|
|
|
|
|
(defun wilder/TeX-insert-align-dwim (arg) |
|
|
|
(defun wilder/TeX-insert-align-dwim (arg) |
|
|
|
(interactive "P") |
|
|
|
(interactive "P") |
|
|
|
(if (texmathp) (wilder/TeX-promote-inline-math arg) |
|
|
|
(if (texmathp) |
|
|
|
|
|
|
|
(let ((why (car texmathp-why))) |
|
|
|
|
|
|
|
(cond ((string-prefix-p "$" why) (wilder/TeX-promote-inline-math arg)) |
|
|
|
|
|
|
|
((string-equal "equation*" why) (LaTeX-modify-environment "align*")) |
|
|
|
|
|
|
|
((string-equal "equation" why) (LaTeX-modify-environment "align")) |
|
|
|
|
|
|
|
((string-equal "align*" why) (when arg (LaTeX-modify-environment "align"))))) |
|
|
|
(wilder/TeX-insert-align arg))) |
|
|
|
(wilder/TeX-insert-align arg))) |
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
This replaces horizontal space with a tilde |
|
|
|
This replaces horizontal space with a tilde |
|
|
|
|