5
votes

With Beamer frames can be repeated by labeling the frame that should be repeated such as

\begin{frame}[label=framelabel]
...
\end{frame}

and then using \againframe{framelabel} at the place where that frame is to be repeated.

How can this method be used with Org-mode's Beamer export? The label can obviously be added by putting it in BEAMER_envargs such as:

* Org-mode section
:PROPERTIES:
:BEAMER_envargs: [label=questions]
:END:

But there are two problems in using \againframe via Org-mode:

  1. \againframe is placed badly both if it is placed under an Org-mode section and if it is put directly in an Org-mode section. The problem is that in the former case is that is is placed inside a frame when it should be placed between. The problem in the latter case is that it is placed inside \frametitle.
  2. \againframe is either swallowed by Org-mode sections or it is marked as one. Both are poor logical representations of its function.

So is there some effective way of using \againframe with Beamer or is there some other way to repeat frames with Org-mode that I have overlooked?

I have already looked at http://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00954.html in trying to work this out.

I am running Org-mode 7.6 in Emacs 23.3.1 and I use Beamer 3.13.

2
It is not an optimal solution, but in the past I have simply collapsed the section and then killed and yanked the region corresponding to the section. Another yank, and you have another copy of the section. Alternatively, would using a Beamer only<> construct work for what you want?cm2
@cm2 Thanks for suggestions. If I understand your suggestions correctly both are fragile in different ways. You mean using C-c C-x C-w to simply make two copies of the section and place them as you want? That would be fragile in that if one section is changed its copy will not be automatically changed. If I understand the \only approach correctly it will require to count to the correct slide that it should be repeated on and, thus, it will break if slides are inserted in between, right?N.N.
Yes, both are fragile. The \only suggestion was if you wanted to repeat a slide with only some small change - as one might do if incrementally revealing parts of a slide. Indeed, if you want to fully repeat the slide at a later point in the presentation, \only will not work.cm2
@cm2 A full repeat is what I am after.N.N.

2 Answers

9
votes

The current org-mode has support for againframe. Just create a frame and add the beamer option BEAMER_env = againframe to the corresponding section. Or use C-c C-b a to insert it if you initialized the beamer mode on org-startup.

More information can be found in the org-mode documentation.

An example is available in the original proposal of the syntax:

* section
** My frame title                     :B_frame:
:PROPERTIES:
:BEAMER_env: frame
:END:

Some text. Some text.  Some text. Some text.
Some text. Some text.  Some text. Some text.

** section                                         :B_againframe:
  :PROPERTIES:
  :BEAMER_env: againframe
  :BEAMER_act: 2
  :BEAMER_ref: *My frame title
  :END:

  This section will create "\againframe<2>{sec-1-2}".

** Following frame
etc.
2
votes

I don't think this is currently possible. The limitation lies in the tree structure of an org document. As far as I understood from your question, the \againframe{...} command basically repeats a slide as is. In org terms, that means the original tree used to generate the slide is repeated. Since the org document format doesn't let you have any content which is not part of a tree (other than the frontmatter/header at the top of a file), I believe this is not possible. This has been discussed on the mailing list a few times, from what I understood there are no plans to implement something like this.