From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torsten Anders Subject: [PATCH] [Beamer export] Example should better export to exampleblock environment Date: Sat, 28 Jan 2012 12:57:36 +0000 Message-ID: <5DA02851-DED2-4906-BAA2-A3AB0A5E61AF@beds.ac.uk> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/mixed; boundary=Apple-Mail-2--591577685 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rr7xb-0003kK-5Y for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 08:04:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rr7xX-000114-9o for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 08:04:51 -0500 Received: from smtp.idnet.com ([212.69.40.133]:55169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rr7xX-00010r-2a for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 08:04:47 -0500 Received: from localhost (unknown [127.0.0.1]) by smtp.idnet.com (Postfix) with ESMTP id 9EB5A9F91D for ; Sat, 28 Jan 2012 12:57:36 +0000 (UTC) Received: from smtp.idnet.com ([127.0.0.1]) by localhost (smtp.idnet.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qt+edyfHTcF0 for ; Sat, 28 Jan 2012 12:57:35 +0000 (GMT) Received: from smtp.idnet.com (template [127.0.0.1]) by smtp.idnet.com (Postfix) with ESMTP id 833439F92C for ; Sat, 28 Jan 2012 12:57:35 +0000 (GMT) Received: from [192.168.0.3] (cust132-dsl91-135-3.idnet.net [91.135.3.132]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.idnet.com (Postfix) with ESMTPS id 58BA39F91D for ; Sat, 28 Jan 2012 12:57:35 +0000 (GMT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --Apple-Mail-2--591577685 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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.=20= 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.=20 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 --Apple-Mail-2--591577685 Content-Disposition: attachment; filename=org-beamer.el.diff Content-Type: application/octet-stream; name="org-beamer.el.diff" Content-Transfer-Encoding: 7bit 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 --Apple-Mail-2--591577685--