emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Beamer export: Executing LaTeX between two frames


From: M . ‘quintus’ Gülker
Subject: Beamer export: Executing LaTeX between two frames
Date: Tue, 21 Jun 2022 10:01:03 +0200

Dear list,

I am working on a presentation for a conference (using org-mode and its
beamer export) and want to exchange the entire background for a specific
frame with an image. This is possible with Beamer, see
<https://tex.stackexchange.com/a/7919>. It works by issueing
\usebackgroundtemplate /between/ the frame environments. The frame
environment needs to be placed inside an extra group of {}, resulting in
a LaTeX construct like this (example taken from the StackExchange link):

    % Local background must be enclosed by curly braces for grouping.
    {
    \usebackgroundtemplate{\includegraphics[width=\paperwidth]{kitten.jpg}}%
    \begin{frame}{Kitten}
    \begin{itemize}
    \item 1
    \item 2
    \item 3
    \end{itemize}
    \end{frame}
    }

I tried to use a #+begin_export beamer construct to achieve this from
within org:

    * Normal Frame

    #+begin_export beamer
    {\usebackgroundtemplate{%
        \includegraphics[width=\paperwidth,height=\paperheight]{test.jpg}}
        \begin{frame}[t]\frametitle{This frame should have another background}
        % ...frame content...
        \end{frame}
    }
    #+end_export

    * Normal frame again

But that results in a LaTeX compilation error, because the command is
not issued between to frames, but within the frame created for the
"Normal Frame" heading. Breaking the construct up in two #+begin_export
beamer constructs like this therefore also does not work, because the
second heading causes an \end{frame} to be inserted after the
\usebackgroundtemplate group has been opened:

    * Normal Frame

    #+begin_export beamer
    {\usebackgroundtemplate{%
        \includegraphics[width=\paperwidth,height=\paperheight]{test.jpg}}
    #+end_export

    * This frame should have another background

    #+begin_export beamer
    }
    #+end_export

    * Normal frame again

So, how do I wrap the \begin{frame}...\end{frame} construct within the
\usebackgroundtemplate group?

  -quintus

--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kontakt@guelker.eu    | O<



reply via email to

[Prev in Thread] Current Thread [Next in Thread]