all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Torsten Anders <torsten.anders@beds.ac.uk>
To: emacs-orgmode@gnu.org
Subject: [PATCH] [Beamer export] Example should better export to exampleblock environment
Date: Sat, 28 Jan 2012 12:57:36 +0000	[thread overview]
Message-ID: <5DA02851-DED2-4906-BAA2-A3AB0A5E61AF@beds.ac.uk> (raw)

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

Dear all,

It is great that org mode makes creating Beamer slides so easy! I would like to include some green example blocks in my slides (e.g., for exercises for my students), and I can turn an org headline and its "content" into an example block by just pressing C-c C-b e -- very nice. 

Now, my problem is that Org mode exports this as a Beamer example environment, instead of an exampleblock environment. The difference is that the exampleblock environment is just a green block that otherwise behaves like the standard Beamer blocks (in particular, users have full control over its title), while an example environment always adds something to the title like this: Example (ACTUAL TITLE). Such behaviour may be useful in special cases, but the exampleblocks are more flexible and should therefore at least be supported as an alternative option, but likely being the default export option. 

Attached to this message there is a simple patch that adds support for exampleblocks (short cut C-c C-b E) by keeping everything else as it is.

Best wishes,
Torsten

--
Dr Torsten Anders
Course Leader, Music Technology
University of Bedfordshire
Park Square, Room A315
http://www.torsten-anders.de


[-- Attachment #2: org-beamer.el.diff --]
[-- Type: application/octet-stream, Size: 764 bytes --]

diff --git a/lisp/org-beamer.el b/lisp/org-beamer.el
index d64ce2d..79999eb 100644
--- a/lisp/org-beamer.el
+++ b/lisp/org-beamer.el
@@ -102,6 +102,7 @@ These are just a completion help.")
     ("theorem"        "t" "\\begin{theorem}%a%U%x"             "\\end{theorem}")
     ("definition"     "d" "\\begin{definition}%a%U%x"          "\\end{definition}")
     ("example"        "e" "\\begin{example}%a%U%x"             "\\end{example}")
+    ("exampleblock"   "E" "\\begin{exampleblock}%a{%h}%x"      "\\end{exampleblock}")
     ("proof"          "p" "\\begin{proof}%a%U%x"               "\\end{proof}")
     ("beamercolorbox" "o" "\\begin{beamercolorbox}%o{%h}%x"    "\\end{beamercolorbox}")
     ("normal"         "h" "%h" "") ; Emit the heading as normal text

             reply	other threads:[~2012-01-28 13:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-28 12:57 Torsten Anders [this message]
2012-01-28 14:59 ` [PATCH] [Beamer export] Example should better export to exampleblock environment Bastien

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

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

  git send-email \
    --in-reply-to=5DA02851-DED2-4906-BAA2-A3AB0A5E61AF@beds.ac.uk \
    --to=torsten.anders@beds.ac.uk \
    --cc=emacs-orgmode@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.