我喜欢AucTeX的最大语法高亮,但我不喜欢AucTeX搞乱字体。例如,如果我使用斜体,它会在我的emacs缓冲区中显示斜体字母,并以小写字母(略高于或低于该行)显示下标和上标。无论我所处的乳胶环境如何,我都喜欢使用固定宽度的字体。
我尝试更改变量font-latex-deactivated-keyword-classes的设置,但语法着色也消失了。
有人可以建议一种解决方法吗?
感谢。
答案 0 :(得分:2)
来自http://www.gnu.org/software/auctex/manual/auctex/Faces.html#Faces
如果您想更改font-latex使用的颜色和字体,请参阅上述说明中提到的面孔并使用M-x customize-face RET <face> RET
。通过键入
M-x customize-group RET font-latex-highlighting-faces RET。
上面的命令打开设置缓冲区,您可以在其中设置适当的字体。保存更改后,.emacs文件将包含类似于:
的行'(font-latex-sectioning-5-face((((类颜色)(背景光)) (:继承变量:前景“blue4”:重量正常:铸造 “大纲”:家庭“世纪哥特”)
在您的示例中,您可以根据您的规范自定义Font Latex Italic Face
。然后你的.emacs应该包含
'(font-latex-italic-face ...)
你设置的任何东西。您可以类似地自定义其他字体的上标,下标和整个主机。
答案 1 :(得分:1)
在AUCTeX的最新版本中:
(setq font-latex-fontify-script nil)
(setq font-latex-fontify-sectioning 'color)
答案 2 :(得分:0)
请参阅this page in the manual和停用内置关键字类的默认值部分。
答案 3 :(得分:0)
在Emacs 24.3上测试。将以下内容放在〜/ .emacs文件中:
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(font-latex-bold-face ((t nil)))
'(font-latex-doctex-documentation-face ((t nil)))
'(font-latex-doctex-preprocessor-face ((t nil)))
'(font-latex-italic-face ((t nil)))
'(font-latex-math-face ((t nil)))
'(font-latex-sectioning-0-face ((t nil)))
'(font-latex-sectioning-1-face ((t nil)))
'(font-latex-sectioning-2-face ((t nil)))
'(font-latex-sectioning-3-face ((t nil)))
'(font-latex-sectioning-4-face ((t nil)))
'(font-latex-sectioning-5-face ((t nil)))
'(font-latex-sedate-face ((t nil)))
'(font-latex-slide-title-face ((t nil)))
'(font-latex-string-face ((t nil)))
'(font-latex-subscript-face ((t nil)))
'(font-latex-superscript-face ((t nil)))
'(font-latex-verbatim-face ((t nil)))
'(font-latex-warning-face ((t nil))))