emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] [Beamer export] Example should better export to exampleblock environment
@ 2012-01-28 12:57 Torsten Anders
  2012-01-28 14:59 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Torsten Anders @ 2012-01-28 12:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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,

Dr Torsten Anders
Course Leader, Music Technology
University of Bedfordshire
Park Square, Room A315

[-- 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-28 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-28 12:57 [PATCH] [Beamer export] Example should better export to exampleblock environment Torsten Anders
2012-01-28 14:59 ` Bastien

Code repositories for project(s) associated with this public inbox


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).