[Emacs] Use theme background color in org-export
This commit is contained in:
parent
be9a5b3bb1
commit
206ffa513e
@ -2982,6 +2982,26 @@ Intero seems to be causing hangs, so it has been disabled
|
|||||||
;; blame.
|
;; blame.
|
||||||
))
|
))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
**** Correct BG color for org-export
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package org
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(defun imalison:org-inline-css-hook (exporter)
|
||||||
|
"Insert custom inline css to automatically set the
|
||||||
|
background of code to whatever theme I'm using's background"
|
||||||
|
(when (eq exporter 'html)
|
||||||
|
(let* ((my-pre-bg (face-background 'default))
|
||||||
|
(my-pre-fg (face-foreground 'default)))
|
||||||
|
(setq
|
||||||
|
org-html-head-extra
|
||||||
|
(concat
|
||||||
|
org-html-head-extra
|
||||||
|
(format "<style type=\"text/css\">\n pre.src {background-color: %s; color: %s;}</style>\n"
|
||||||
|
my-pre-bg my-pre-fg))))))
|
||||||
|
|
||||||
|
(add-hook 'org-export-before-processing-hook 'imalison:org-inline-css-hook)))
|
||||||
|
#+END_SRC
|
||||||
**** org-projectile
|
**** org-projectile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(imalison:use-package org-projectile
|
(imalison:use-package org-projectile
|
||||||
|
Loading…
Reference in New Issue
Block a user