From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Beamer export: How to handle overlayarea Date: Mon, 21 Oct 2013 15:52:14 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYAHt-0001rz-TR for emacs-orgmode@gnu.org; Mon, 21 Oct 2013 03:52:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYAHo-0005zc-7a for emacs-orgmode@gnu.org; Mon, 21 Oct 2013 03:52:29 -0400 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:37561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYAHn-0005zY-Sv for emacs-orgmode@gnu.org; Mon, 21 Oct 2013 03:52:24 -0400 Received: by mail-pa0-f48.google.com with SMTP id bj1so7593511pad.21 for ; Mon, 21 Oct 2013 00:52:22 -0700 (PDT) Received: from localhost ([219.137.191.101]) by mx.google.com with ESMTPSA id fk4sm23660664pab.23.2013.10.21.00.52.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 00:52:21 -0700 (PDT) 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: orgmode Per the beamer user guide, the syntax of the overlayarea environment is: \begin{overlayarea}{area width}{area height} =09environment contents \end{overlayarea} I can't figure out how to get the width and height in properly. >From the customize interface, I added overlayarea as follows: '(org-beamer-environments-extra (quote (("CJK" "Z" "\\begin{CJK}%a%H"=20 "\\end{CJK}") ("onlyenv" "O" "\\begin{onlyenv}%a" "\\end{onlyenv}")=20 ("overlayarea" "Y" "\\begin{overlayarea}%o%a" "\\end{overlayarea}")))) And I can plug text into %o using the BEAMER_OPT property: *** Overlays=09=09=09=09=09=09 :B_overlayarea: :PROPERTIES: :BEAMER_env: overlayarea :BEAMER_OPT: {0.9\textwidth}{0.7\textheight} :END: --> \begin{overlayarea}[{0.9\textwidth}{0.7\textheight}] Oh, hello, BEAMER_OPT automatically adds square brackets, how charming. I guess I can hack up a filter to remove the brackets after overlayarea. .. 45 minutes after I started writing this email... I copied someone else's ignoreheading filter and modified it for this=20 purpose: (defun hjh-overlayarea (contents backend info) "Remove brackets from options for overlayarea." (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii) (string-match "\\\\begin{overlayarea}\\[\\(.*\\)\\]" (downcase contents))) (replace-match "\\\\begin{overlayarea}\\1" nil nil contents))) Replace-match's handling of backslashes threw me at first, but this appears=20= to work. Still, I wonder if there shouldn't be, e.g., %O for=20 options-without-brackets. Because that was 45 minutes I spent NOT writing=20 my slides :-| Also, side note, [1] seems not to document BEAMER_OPT for environments=20 within a frame. Reading this page, you would think you could only use it=20 for frames. I had to dig into the source code to find how to populate %o. hjh [1] http://orgmode.org/worg/exporters/beamer/ox-beamer.html