在 auctex 数学模式中插入 unicode 字符

在 auctex 数学模式中插入 unicode 字符

我使用 emacs 和 auctex 来运行 lualatex。有没有办法修改 auctex 的数学输入,例如修改 LaTeX-math-zeta,将其绑定到按键 <`z>,这样就\zeta写成了 unicode 字符 ζ 而不是 ?

我想过重新定义函数 LaTeX-math-insert,但不知道如何做到这一点。

答案1

这就是 preview-latex 的目的。这里,使用 auctex 11.89,将光标放在数学项上,只需键入C-c C-p C-p,编辑器就会显示 ζ 。

答案2

虽然不是很优雅,但对我来说还是有用的:我只需要使用我的愚蠢解决方案,并为我需要的每个字符定义一个函数。到目前为止,我拥有的是

(defun LaTeX-math-alpha  () "Insert α" (interactive) (insert "α" ))
(defun LaTeX-math-approx () "Insert ≈" (interactive) (insert "≈" ))
(defun LaTeX-math-beta   () "Insert β" (interactive) (insert "β" ))
(defun LaTeX-math-delta  () "Insert δ" (interactive) (insert "δ" ))
(defun LaTeX-math-epsilon() "Insert ϵ" (interactive) (insert "ϵ" ))
(defun LaTeX-math-zeta   () "Insert ζ" (interactive) (insert "ζ" ))
(defun LaTeX-math-eta    () "Insert η" (interactive) (insert "η" ))
(defun LaTeX-math-theta  () "Insert θ" (interactive) (insert "θ" ))
(defun LaTeX-math-iota   () "Insert ι" (interactive) (insert "ι" ))
(defun LaTeX-math-kappa  () "Insert κ" (interactive) (insert "κ" ))
(defun LaTeX-math-lambda () "Insert λ" (interactive) (insert "λ" ))
(defun LaTeX-math-mu     () "Insert μ" (interactive) (insert "μ" ))
(defun LaTeX-math-nu     () "Insert ν" (interactive) (insert "ν" ))
(defun LaTeX-math-xi     () "Insert ξ" (interactive) (insert "ξ" ))
(defun LaTeX-math-pi     () "Insert π" (interactive) (insert "π" ))
(defun LaTeX-math-rho    () "Insert ρ" (interactive) (insert "ρ" ))
(defun LaTeX-math-sigma  () "Insert σ" (interactive) (insert "σ" ))
(defun LaTeX-math-tau    () "Insert τ" (interactive) (insert "τ" ))
(defun LaTeX-math-upsilon() "Insert υ" (interactive) (insert "υ" ))
(defun LaTeX-math-phi    () "Insert ϕ" (interactive) (insert "ϕ" ))
(defun LaTeX-math-chi    () "Insert χ" (interactive) (insert "χ" ))
(defun LaTeX-math-psi    () "Insert ψ" (interactive) (insert "ψ" ))
(defun LaTeX-math-omega  () "Insert ω" (interactive) (insert "ω" ))
(defun LaTeX-math-varepsilon()"Insert ε" (interactive) (insert "ε" ))
(defun LaTeX-math-vartheta   () "Insert ϑ" (interactive) (insert "ϑ" ))
(defun LaTeX-math-varpi      () "Insert ϖ" (interactive) (insert "ϖ" ))
(defun LaTeX-math-varrho     () "Insert ϱ" (interactive) (insert "ϱ" ))
(defun LaTeX-math-varsigma   () "Insert ς" (interactive) (insert "ς" ))
(defun LaTeX-math-varphi () "Insert φ" (interactive) (insert "φ" ))

(defun LaTeX-math-cdot   () "Insert ⋅" (interactive) (insert "⋅" ))
(defun LaTeX-math-dif    () "Insert 

相关内容