doomemacs/modules/lang/org/contrib/present.el
Henrik Lissner 76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00

45 lines
1.3 KiB
EmacsLisp

;;; lang/org/contrib/present.el -*- lexical-binding: t; -*-
;;;###if (featurep! +present)
(defvar +org-present-text-scale 7
"The `text-scale-amount' for `org-tree-slide-mode'.")
(after! ox
(add-to-list 'org-export-backends 'beamer))
;;
;;; Packages
(use-package! ox-reveal
:after ox
:init
;; Fix #1127, where ox-reveal adds an errant entry to
;; `org-structure-template-alist'
(setq org-reveal-note-key-char nil)
:config
(setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3/"
org-reveal-mathjax t))
(use-package! org-tree-slide
:commands org-tree-slide-mode
:config
(org-tree-slide-simple-profile)
(setq org-tree-slide-skip-outline-level 2
org-tree-slide-activate-message " "
org-tree-slide-deactivate-message " "
org-tree-slide-modeline-display nil)
(map! :map org-tree-slide-mode-map
:n [right] #'org-tree-slide-move-next-tree
:n [left] #'org-tree-slide-move-previous-tree)
(add-hook! 'org-tree-slide-mode-after-narrow-hook
#'(+org-present-detect-slide-h
+org-present-add-overlays-h
org-display-inline-images))
(add-hook 'org-tree-slide-mode-hook #'+org-present-init-org-tree-window-h)
(advice-add #'org-tree-slide--display-tree-with-narrow
:around #'+org-present*narrow-to-subtree))