From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Beamer title is (incorrectly?) outside of a frame Date: Sat, 11 Jan 2014 09:44:56 +0100 Message-ID: <87fvou9abb.fsf@gmail.com> References: <3bf20787-19e4-49ff-bbb5-5c90bcc58a95@dewdrop-world.net> <871u15j9ct.fsf@gmail.com> <87ob48ht2p.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1uBP-0003TU-Bw for Emacs-orgmode@gnu.org; Sat, 11 Jan 2014 03:44:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1uBJ-0007Gv-Hs for Emacs-orgmode@gnu.org; Sat, 11 Jan 2014 03:44:43 -0500 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:57806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1uBJ-0007Gp-2E for Emacs-orgmode@gnu.org; Sat, 11 Jan 2014 03:44:37 -0500 Received: by mail-we0-f175.google.com with SMTP id w62so4867765wes.6 for ; Sat, 11 Jan 2014 00:44:36 -0800 (PST) In-Reply-To: (James Harkins's message of "Sat, 11 Jan 2014 14:39:32 +0800") 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: jamshark70@dewdrop-world.net Cc: Emacs-orgmode@gnu.org Hello, James Harkins writes: > Patch attached. The patch is based on release_8.2.4 (as noted in my bug > report from a few minutes ago, I can't perform any Beamer export against > current master). If it doesn't apply against master, I'll be happy to tweak > it, once the other bug is fixed. Thank you for the patch. > Let me know if there are any other problems, say, LISP style errors. I > wrapped my change in a (let...) to isolate it from other bits of the > code. Comments below. > I haven't signed FSF papers, though... I guess I should get on that. Good idea. Meanwhile, you need to add TINYCHANGE at the end of your commit message. > From 1f70f3f41b266da204abd8dbcdddfefe648868eb Mon Sep 17 00:00:00 2001 > From: James Harkins > Date: Sat, 11 Jan 2014 11:59:32 +0800 > Subject: [PATCH] ox-beamer: Wrap the title command in a frame for "beamer" > class Here, you should specify the function modified and how it was modified. * lisp/ox-beamer (org-beamer-template): ... > This supports an option, described in the beamer user guide, for > supporting material using the beamerarticle package. > > 1. Write presentation contents in slides. > 2. Write content /outside/ of slides for the print version. > 3. To make #2 invisible in the slideshow, include "ignorenonframetext" > in the LaTeX class options. > > The problem was that Beamer export writes the title command outside of > a frame. So, the title frame disappears when using > ignorenonframetext. But, you don't want the title inside a frame for > article export. > > The patch tests :latex-class. If it's "beamer," it adds \begin{frame} > before and \end{frame} after the title command. Actually, I was wrong. `:latex-class' will contain the name given by the user to its Beamer configuration. It may be totally unrelated to "beamer". You need to use a regexp to find out what class is used: (let ((beamer-class-p (and (stringp header) (org-string-match-p "^[ \t]*\\\\documentclass\\(?:\\[.*\\]\\)?{beamer}[ \t]*$" (nth 1 (assoc (plist-get info :latex-class) org-latex-classes))))))) > + (if (string= (plist-get info :latex-class) "beamer") > + (format "\\begin{frame}%s\\end{frame}" titlecmd) > + titlecmd)) You need to check if TITLECMD is nil before wrapping it within a frame. Ideally before defining BEAMER-CLASS-P. Regards, -- Nicolas Goaziou