LaTeX insta previews

This commit is contained in:
Curt Spark 2020-04-14 15:10:20 +01:00
parent e9fc95f281
commit 44bfd2fa1f
1 changed files with 21 additions and 10 deletions

View File

@ -288,17 +288,28 @@ A recreation of the iconic Suckless Dynamic Menu.
** Org Mode ** Org Mode
*** Simple Org Mode Preview in HTML *** Simple Org Mode Preview in HTML
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org-preview-html (defun update-other-buffer ()
:ensure t (interactive)
:config (other-window 1)
:bind (revert-buffer nil t)
("C-c r" . 'org-preview-html-mode) (other-window -1))
(use-package htmlize
:ensure t))
(add-to-list 'load-path (defun org-compile-beamer-and-update-other-buffer ()
(concat user-emacs-directory "Has as a premise that it's run from an org-mode buffer and the
(convert-standard-filename "elisp/"))) other buffer already has the PDF open"
(interactive)
(org-beamer-export-to-pdf)
(update-other-buffer))
(defun org-compile-latex-and-update-other-buffer ()
"Has as a premise that it's run from an org-mode buffer and the
other buffer already has the PDF open"
(interactive)
(org-latex-export-to-pdf)
(update-other-buffer))
(define-key org-mode-map (kbd "C-c lr") 'org-compile-latex-and-update-other-buffer)
(define-key org-mode-map (kbd "C-c br") 'org-compile-beamer-and-update-other-buffer)
#+END_SRC #+END_SRC
*** LateX Preview *** LateX Preview
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp