Added pptx to .emacs and a template to Templates/

This commit is contained in:
Nathan Schneider
2020-02-25 19:36:45 +00:00
parent ab6f265e72
commit 32bccd5d6b
2 changed files with 6 additions and 2 deletions
+6 -2
View File
@@ -102,7 +102,7 @@
(defun pandoc ()
(interactive)
(let (file-type file-ext tmp-out-file tmp-out-file out-file current-dir)
(setq file-type (read-string "File type (epub, [html], odt, pdf, slides, etc.): "))
(setq file-type (read-string "File type (epub, [html], odt, pdf, pptx, reveal, etc.): "))
(setq file-ext file-type)
;; set default as html
(when (string-equal file-type "")
@@ -112,12 +112,16 @@
(when (string-equal file-type "pdf")
(setq file-type "latex --variable fontsize='11pt'"))
;; set up slides revealjs routine
(when (string-equal file-type "slides")
(when (string-equal file-type "reveal")
(setq file-ext "html")
;; Light approach, which requires web access and readable code (but speaker notes and relative paths don't work):
;; (setq file-type "revealjs -V revealjs-url='http://lab.hakim.se/reveal-js' --standalone"))
;; Heavy embedded binary approach (relies on reveal.js/ being in ~/.revealjs/):
(setq file-type "revealjs --self-contained -V revealjs-url='/home/ntnsndr/.revealjs/reveal.js' -V theme=ntn -V controls=false --slide-level=2"))
;; set up slides pptx routine
(when (string-equal file-type "pptx")
(setq file-ext "pptx")
(setq file-type "pptx --reference-doc='/home/ntnsndr/Templates/Slideshow.pptx'"))
;; proceed
(setq tmp-in-file "/tmp/pandoc-in.tmp")
(setq tmp-out-file (concat "/tmp/pandoc-out." file-ext))
Binary file not shown.