如果需要处理节、章节等特定内容,可以在.emacs
文件中添加以下内容:
(setq font-latex-fontify-sectioning 'color)
编辑 这是我通常用来自定义AUCTeX格式的配置:
;; Only change sectioning colour
(setq font-latex-fontify-sectioning 'color)
;; super-/sub-script on baseline
(setq font-latex-script-display (quote (nil)))
;; Do not change super-/sub-script font
(custom-set-faces
'(font-latex-subscript-face ((t nil)))
'(font-latex-superscript-face ((t nil)))
)
;; Exclude bold/italic from keywords
(setq font-latex-deactivated-keyword-classes
'("italic-command" "bold-command" "italic-declaration" "bold-declaration"))
(defun fix-fonts ()
(interactive)
(mapc
(lambda (face)
(set-face-attribute face nil
;; :family (if (string= system-type "darwin")
;; "Menlo"
;; "Inconsolata")
:width 'normal
:height 1.0
:weight 'normal
:underline nil
:slant 'normal))
(remove 'default (face-list))))
我不再处理家庭事务,因为我没有时间找到一个良好的编程方法来正确地处理它,而且似乎也不重要,但你的情况可能会有所不同。此外,我不会在“默认”字体上设置任何东西,因为其他一些值是相对的,需要一个固定的参考点。
font-latex-script-display
、font-latex-subscript-face
设置为nil
,然后将italic-command
/bold-command
等添加到font-latex-deactivated-keyword-classes
中 - 我从来不需要做更多的事情(=. - Sébastien Le Callonnec.emacs
中可以工作,但我无法通过M-x
在emacs中调用它吗? - hpekristiansen