emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: jamshark70@dewdrop-world.net
Cc: Emacs-orgmode@gnu.org
Subject: Re: Beamer title is (incorrectly?) outside of a frame
Date: Sat, 11 Jan 2014 09:44:56 +0100	[thread overview]
Message-ID: <87fvou9abb.fsf@gmail.com> (raw)
In-Reply-To: <CAFniQ7XW2rYJSj0uswE=BfX9+m+TM9_SKiyET1pyLbpNbhMXQQ@mail.gmail.com> (James Harkins's message of "Sat, 11 Jan 2014 14:39:32 +0800")

Hello,

James Harkins <jamshark70@gmail.com> 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 <jamshark70@dewdrop-world.net>
> 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

  reply	other threads:[~2014-01-11  8:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-22 10:38 Beamer title is (incorrectly?) outside of a frame James Harkins
2013-12-22 10:42 ` James Harkins
2013-12-22 13:36   ` Nicolas Goaziou
2013-12-23  3:33     ` James Harkins
2013-12-23  8:25       ` Nicolas Goaziou
2013-12-26  5:50         ` James Harkins
     [not found]         ` <bc14736f-f98c-4112-8f54-b35dcb5416a9@dewdrop-world.net>
2014-01-11  6:39           ` James Harkins
2014-01-11  8:44             ` Nicolas Goaziou [this message]
2014-01-11  8:49               ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87fvou9abb.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=jamshark70@dewdrop-world.net \
    /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 public inbox

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

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