0

I have this in my Emacs:

enter image description here

I want the title and headers to be the same as the normal text. What should I put into my .spacemacs file?

1 Answer 1

1

This is easiest achieved via the customization interface. You should remove (disable) the height attributes from the org-document-title and the org-level-1,2,3... faces. You navigate to the correct section of the customization menu by using either SPC SPC customize-group org-faces, or SPC SPC customize-variable and then choose some specific face.

After disabling the height attributes by 'unchecking' the box and saving the settings (press C-x C-s or the Apply and Save button), the configuration is added to the last section of your dotfile.

If you prefer to set it from your user-config, then you could use:

  (with-eval-after-load 'org-faces
    (dolist (face '(org-document-title
                   org-level-1
                   org-level-2
                   org-level-3))
     (set-face-attribute face nil :height 1.0)))

Using a float for the height attribute makes Emacs use 'relative scaling' (see [section 'Face attributes' in the elisp reference](40.12.1 Face Attributes)).

4
  • I have tried it, saved it and there is no change ;( It writes: invalid face: org-document-title
    – fegax
    Jun 10 at 12:27
  • 1
    Try adding (require 'org-faces) before the code above.
    – NickD
    Jun 10 at 12:30
  • 1
    Haha, you are fast (thanks @NickD)... I was just adding this, I forgot to paste the correct version indeed. Better use with-eval-after-load as org (and also org-faces) are lazy loaded in Spacemacs. Jun 10 at 12:31
  • 1
    Thanks it's working now ;)
    – fegax
    Jun 10 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.