emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: takaxp@ieee.org
Cc: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: org-tree-slide: some small changes
Date: Sun, 27 Jan 2013 16:38:02 +1030	[thread overview]
Message-ID: <87txq3upj1.fsf@ucl.ac.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: treeslide-demo.org --]
[-- Type: text/org, Size: 2530 bytes --]

#+TITLE:     Demonstration of org tree slide presentation
#+AUTHOR:    Eric S Fraga
#+EMAIL:     e.fraga@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 #3: org-tree-slide.el --]
[-- Type: application/emacs-lisp, Size: 22464 bytes --]

             reply	other threads:[~2013-01-27  6:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27  6:08 Eric S Fraga [this message]
2013-01-27 14:58 ` org-tree-slide: some small changes Takaaki ISHIKAWA
2013-01-28 10:21   ` Eric S Fraga
2013-01-28 17:58     ` Takaaki ISHIKAWA
2013-01-31  4:03       ` Eric S Fraga
2013-02-03  3:04         ` Eric S Fraga
2013-02-03  7:32           ` Takaaki ISHIKAWA
2013-02-03  8:18             ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txq3upj1.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=takaxp@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).