emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Solution for changing background images with Beamer export
@ 2015-05-19 18:05 Fred
  0 siblings, 0 replies; only message in thread
From: Fred @ 2015-05-19 18:05 UTC (permalink / raw)
  To: emacs-orgmode


Hello,

I make a lot of presentations using Org Mode exporting to Beamer. One
issue that came up is using transparent background images, or rather,
changing background images during the presentation.

That is, you want to do something like this:

(background image image1.jpg)
slide1
slide2
(background image image2.jpg)
slide3
slide4

etc.

The obvious way to do this was as follows:

#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,14pt]
#+BEAMER_THEME: Pittsburgh
#+BEAMER_COLOR_THEME: orchid
#+BEAMER_FONT_THEME: serif [stillsansserifsmall,stillsansseriflarge,structure]
#+BEAMER_HEADER: \setbeamercolor{background canvas}{bg=}
#+BEAMER_HEADER: \setbeamertemplate{navigation symbols}{}
#+BEAMER_HEADER: \logo{\includegraphics{gng-logo.png}}
#+BEAMER_HEADER: \usebackgroundtemplate{\includegraphics[width=\paperwidth]{images/image1.jpg}}%
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
#+OPTIONS: toc:nil h:1            <<<<<------Note frames at level 1

* Song1
%%%% stuff %%%%

%%%% Trying to change background here %%%%
#+BEAMER: \usebackgroundtemplate{\includegraphics[width=\paperwidth]{images/image2.jpg}}%
* Song2
%%% etc. %%%

With this approach the export won't work correctly (and it's
completely understandable why not --- you only know where the old
frame ends when you see the beginning of the new frame). Looking at
the generated Latex, I see

\usebackgroundtemplate{\includegraphics[width=\paperwidth]{images/image2.jpg}}%
\end{frame}
\begin{frame}[label=sec-5]{Song2}

which basically does nothing as far as the background goes. I was hoping for:

\end{frame}
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{images/image2.jpg}}%
\begin{frame}[label=sec-5]{Song2}

In my research on this I saw that a number of people had this problem
and nobody seemed to know what to do.

Turns out there's a simple workaround. Just put the frames one level
deeper and do something like the following:

%%%% set background in prologue using beamer command as above %%%%
%%%% set frames at level 2 %%%%
#+OPTIONS: ... :h 2

* Song1 (This is a dummy heading at least for my purposes)

** Song 1 slide 1
%%% stuff %%%
** Song 1 slide 2
%%% etc. %%%

* Song2 (Dummy heading)
#+BEAMER: \usebackgroundtemplate{\includegraphics[width=\paperwidth]{images/image2.jpg}}%
** Song 2 slide 1
%%% stuff %%%
** Song 2 slide 2
%%% etc. %%%

* Song3 (Dummy heading)
#+BEAMER: \usebackgroundtemplate{\includegraphics[width=\paperwidth]{images/image3.jpg}}%
** Song 3 slide 1
%%% stuff %%%
** Song 3 slide 2
%%% etc. %%%

While this will affect the outlining and so on, it may nevertheless be
useful in many cases.

I hope this is useful to someone.


-- 
Fred Gilham                            fred@sunbot.homedns.org
   just make me lighter
   make me lighter still
     'til the yellow of the sun takes me
   [oh what Lazarus saw! I cannnot bear this anymore!]
                                              -- Linshuang Lu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-19 18:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19 18:05 Solution for changing background images with Beamer export Fred

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