Orgmode 标题级别的高度

7

我想设置org-mode标题的字体大小。
它们默认情况下太大了(是的,大小确实很重要)。

我一直在尝试查找参考资料,但非常恼人的是,我没有找到。
如何通过我的配置文件自定义所有标题的比例值?
通过emacs中的组设置--> org-faces,我发现它被设置为高度和比例。
我想将所有比例设置为1。

3个回答

11

找到了答案。虽然太明显了,但仍然很烦人。

(custom-set-faces
  '(org-level-1 ((t (:inherit outline-1 :height 1.0))))
  '(org-level-2 ((t (:inherit outline-2 :height 1.0))))
  '(org-level-3 ((t (:inherit outline-3 :height 1.0))))
  '(org-level-4 ((t (:inherit outline-4 :height 1.0))))
  '(org-level-5 ((t (:inherit outline-5 :height 1.0))))
)

1
我的标题字体大小与文本相同,除非我使用了这个特定的主题。现在只是好奇,你遇到的问题可能是一样的吗?也就是说,这个主题可能会破坏你的标题字体大小。 - nymo
可能是因为我仍然使用之前的主题 - monokai。 - Devon Ville
1
谢谢,@nymo,那正是我的问题所在。我没有注意到,因为我从未在不使用solarized的情况下使用org。解决方法:(setq solarized-scale-org-headlines nil) - Ben Challenor
这些不是用于标题而是用于标题吗? - Emmanuel Goldstein

1
如果您正在使用Doom Emacs,可以尝试以下操作(将doom-city-lights替换为您的主题):
(custom-theme-set-faces!
'doom-city-lights      
'(org-level-4 :inherit outline-4 :height 1.1)      
'(org-level-3 :inherit outline-3 :height 1.25)      
'(org-level-2 :inherit outline-2 :height 1.5)      
'(org-level-1 :inherit outline-1 :height 1.75)      
'(org-document-title :height 2.0 :underline nil))

或者你可以在 org-mode 之后挂载 doom-docs-mode(它会打开所有的“美化”):

(add-hook! 'org-mode-hook 'doom-docs-mode)

0

Daniel的解决方案无法改变 #+Title 的字体大小/高度。 我在 spacemacs 的自定义主题上成功实现了这一点。 通过编辑 dotfilespacemacs,即 .spacemacs > (defun dotspacemacs/emacs-custom-settings () 部分或者如果是标准 Emacs,则是你的 regular init.el。

(custom-set-faces
  '(org-level-1 ((t (:inherit outline-1 :height 2.0))))
  '(org-level-2 ((t (:inherit outline-2 :height 1.8))))
  '(org-level-3 ((t (:inherit outline-3 :height 1.6))))
  '(org-level-4 ((t (:inherit outline-4 :height 1.4))))
  '(org-level-5 ((t (:inherit outline-5 :height 1.0))))
  (set-face-attribute 'org-document-title nil :height 2.0)

感谢 Viking667 先生/小姐和 habamax 在 IRC 提供的解决方案。对于他们的帮助,我们表示感谢。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接