Dear Takaaki,

I have been playing with your org tree slide mode.  I really like it.

It didn't quite do what I wanted so I have played around with it.  I've
made a couple of simple changes which you may wish to consider
incorporating.  Specifically, I have added two hooks, one run just
before playing the slide show and one run when the slide show is
stopped.  This allows me to, for instance, turn off flyspell mode,
increase the text scale etc. for the actual slide show but revert these
back after I am finished showing the slides.

I realise that the play hook may duplicate the mode-hook you already had
defined but I couldn't get the latter to work.  It turns out that there
was a typographical error in =org-tree-slide-mode= in that it tried to
run the wrong hook (=org-mode-slide-mode-hook= instead of
=org-tree-slide-mode-hook=) but I only figured that out once I had added
my own hooks.  I have fixed that error as well but decided to leave the
hooks in place for the moment (I have to work on an actual talk now...).

Please see attached the slightly modified version of your code and an
example slide show which shows a couple of example hooks.  Please feel
free to incorporate any of the changes you wish, if any.

Thanks for an excellent little tool that is proving to be very useful to
me!

eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-874-gf11acc
#+TITLE:     Demonstration of org tree slide presentation
#+AUTHOR:    Eric S Fraga
#+EMAIL:     e.fr...@ucl.ac.uk
#+DATE:      2013-01-26 Sat

Start by executing (=C-c C-c=) this emacs lisp code which will set
things up correctly.  To play the slide, hit =F8=, aka =M-x
org-tree-slide-mode RET=.  To finish the slide show, hit =F8= again.  Use
=C-F8= to see the table of contents at any time; the table of contents
supports navigation.  Hit =<right>= to resume presentation with any
given slide.

#+begin_src emacs-lisp :results none
  (require 'org-tree-slide)
  (defun esf/play-org-tree-slide ()
    (auto-fill-mode t)
    (evil-emacs-state)
    (flyspell-mode-off)
    (org-preview-latex-fragment)
    (org-toggle-pretty-entities)
    (setq sentence-highlight-mode nil)
    (text-scale-set 5)
    (delete-other-windows)
    (message "ESF playing org tree slide"))
  (add-hook 'org-tree-slide-mode-play-hook 'esf/play-org-tree-slide)
  (defun esf/stop-org-tree-slide ()
    (auto-fill-mode t)
    (evil-normal-state)
    (flyspell-mode-on)
    (setq sentence-highlight-mode t)
    (text-scale-set 1)
    (message "ESF stopping org tree slide"))
  (add-hook 'org-tree-slide-mode-stop-hook 'esf/stop-org-tree-slide)
  (local-set-key (kbd "<f8>") 'org-tree-slide-mode)
  (local-set-key (kbd "C-<f8>") 'org-tree-slide-content)
  (local-set-key (kbd "S-<f8>") 'org-tree-slide-skip-done-toggle)
  (setq org-format-latex-options '(:foreground "white" :background "black" :scale 3 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
        org-latex-create-formula-image-program 'imagemagick
        org-tree-slide-heading-emphasis t
        )
  ;;(org-tree-slide-mode)
#+end_src

Execute the following code when wanting to edit the slides in a more
normal environment:

#+begin_src emacs-lisp :results none
  (evil-normal-state)
  (flyspell-mode-on)
  (text-scale-set 1)
#+end_src

* Introduction

  - this is short.
  - but could be longer.
* Equations
 
  - probably do not work:

    \begin{align}
    y & = \sqrt {x} \\
    z &= \int_0^\infty t \, dt
    \end{align}

  - actually, they do work but I cannot seem to get the right
    background colour: FIXED!  Used ImageMagick in lieu of dvipng.

  - What about a different latex fragment, such as $x \in [0,1)$?

  - they even work inline if we look at \alpha and \beta.

* Images

  [[./mip.png]]

* Actions
  - Do something
  - And something else
* Assignments
  - Joe does this
  - Jill does something else

Attachment: org-tree-slide.el
Description: application/emacs-lisp

Reply via email to