2. split to show slide and full image
3. plain text
-** Title slide :slide:
+** Title slide :slide:
#+BEGIN_SRC emacs-lisp-slide
(org-show-animate '("Welcome to the org-show" "John Kitchin"))
#+END_SRC
-** Presentations in org-mode :slide:
+** Presentations in org-mode :slide:
This should be easy
1. Create your org-file. Tag headlines with :slide:
org-show is based on this blog post: http://sachachua.com/blog/2013/04/how-to-present-using-org-mode-in-emacs/
Thanks Sacha!
-** Test out some themes :slide:
+** Test out some themes :slide:
[[elisp:(load-theme 'my)]] [[elisp:(disable-theme 'my)]]
[[elisp:(load-theme 'anti-zenburn t)]] [[elisp:(disable-theme 'anti-zenburn)]]
-** Equations :slide:
+** Equations :slide:
It should be easy to show equations like this $\int_0^x \frac{1}{2} \sin x dx = 6$.
It is. Maybe you prefer equation environments?
Want to see the equation source? [[elisp:(org-ctrl-c-ctrl-c)][click here]]
Back to equations: C-c C-x C-l
-** Figures :slide:
+** Figures :slide:
Figures should show up in two panes.
The left pane shows the slide. The right pane shows the figure, scaled to fit in the window.
Here is a little screen capture:
[[./taskbar.png]]
-** Need a more complicated layout? :slide:
+** Need a more complicated layout? :slide:
Write some code to generate it, and put it in an emacs-lisp-slide block. org-show will run it and show you the result
#+BEGIN_SRC emacs-lisp
,#+END_SRC
#+END_EXAMPLE
-** A complicated layout :slide:
+** A complicated layout :slide:
#+BEGIN_SRC emacs-lisp-slide
(delete-other-windows)
(split-window-right)
(other-window 1)
(find-file "doi-utils.org")
#+END_SRC
-** Code blocks should be runnable and editable :slide:
+** Code blocks should be runnable and editable :slide:
#+BEGIN_SRC python
print 6 + 62
They are.
-** We can use many languages :slide:
+** We can use many languages :slide:
(of course, you must have them installed on your computer)
#+BEGIN_SRC emacs-lisp
** Interactivity is important
We get it.
-*** Snake :slide:
+*** Snake :slide:
#+BEGIN_SRC emacs-lisp-slide
(snake)
#+END_SRC
-*** tetris :slide:
+*** tetris :slide:
#+BEGIN_SRC emacs-lisp-slide
(when (and (boundp 'snake-buffer-name) (get-buffer snake-buffer-name))
#+END_SRC
-*** doctor :slide:
+*** doctor :slide:
#+BEGIN_SRC emacs-lisp-slide
(doctor)
#+END_SRC
-*** Become a graffiti artist :slide:
+*** Become a graffiti artist :slide:
#+BEGIN_SRC emacs-lisp-slide
(progn
(switch-to-buffer (get-buffer-create "*artist*"))
#+END_SRC
-*** Or draw lines :slide:
+*** Or draw lines :slide:
#+BEGIN_SRC emacs-lisp-slide
(progn
(switch-to-buffer (get-buffer-create "*artist*"))
(artist-select-op-line))
#+END_SRC
-** No seriously, we can do real work! :slide:
+** No seriously, we can do real work! :slide:
:PROPERTIES:
:CUSTOM_ID: sec:data-tab-code
:END:
#+RESULTS:
You can make links to a table like this: ref:tab-data.
-** Interactive links :slide:
+** Interactive links :slide:
<<beginning>>
You can have links that take you to places: [[beginning]], [[end]], to a [[#sec:data-tab-code][section]],
Or to open a [[http://kitchingroup.cheme.cmu.edu][website]].
<<end>>
-** Conclusions :slide:
+** Conclusions :slide:
That is the end!
#+BEGIN_SRC emacs-lisp-slide
** Some basic setup
#+BEGIN_SRC emacs-lisp :tangle org-show.el
(defvar org-show-presentation-file nil "File containing the presentation.")
+
(defvar org-show-slide-tag "slide" "Tag that marks slides.")
+
(defvar org-show-slide-tag-regexp (concat ":" (regexp-quote org-show-slide-tag) ":"))
+
(defvar org-show-latex-scale 4.0 "scale for latex preview")
(defvar org-show-original-latex-scale
"Original scale for latex preview, so we can reset it.")
(defvar org-show-text-scale 4 "scale for text in presentation")
+
(defvar org-show-current-slide-number 1 "holds current slide number")
(defvar org-show-mogrify-p (executable-find "mogrify"))
(defvar org-show-tags-column -60 "column position to move tags to in slide mode")
+
(defvar org-show-original-tags-column org-tags-column "Save value so we can change back to it")
-(when org-show-mogrify-p (require 'eimp))
+(defvar *org-show-flyspell-mode* (when (boundp flyspell-mode)
+ (flyspell-mode))
+ "whether flyspell mode is enabled at beginning of show")
+(defvar *org-show-running* nil
+ "Flag for if the show is running")
+(when org-show-mogrify-p (ignore-errors (require 'eimp)))
#+END_SRC
** Make a minor mode and menu
\\{org-show-mode-map}"
:lighter " org-show"
:global t
- :keymap org-show-mode-map)
+ :keymap org-show-mode-map
+
+ (if org-show-mode
+ ;; we are in org-show mode
+ (progn
+ ;; turn off flyspell mode
+ (if flyspell-mode
+ (progn
+ (setq *org-show-flyspell-mode* t)
+ (flyspell-mode-off))
+ (setq *org-show-flyspell-mode* nil)))
+ ;; we are leaving flyspell mode
+ (when *org-show-flyspell-mode*
+ (flyspell-mode-on))
+
+ ;; close the show.
+ (when *org-show-running*
+ (org-show-stop-slideshow))))
#+END_SRC
** Prepare and show the slide
(other-window 1) ; back to slide
(goto-char (point-min))
(text-scale-set org-show-text-scale)
- (org-display-inline-images)
+ (org-remove-inline-images)
(org-cycle-hide-drawers t)
(org-show-subtree))
"Start the slide show, at the beginning"
(interactive)
+ (setq *org-show-running* t)
(setq org-show-presentation-file (expand-file-name (buffer-name)))
(beginning-of-buffer)
(setq org-tags-column org-show-tags-column)
;; make slide tag visible again
(remove-from-invisibility-spec 'slide)
+ ;; Redisplay inline images
+ (org-display-inline-images)
+
;; reset latex scale
(plist-put org-format-latex-options :scale org-show-original-latex-scale)
(abbreviate-file-name (buffer-file-name))))
(setq org-tags-column org-show-original-tags-column)
(org-set-tags-command '(4) t)
-
+ (setq *org-show-running* nil)
(org-show-mode -1))
(defalias 'stop 'org-show-stop-slideshow)