Re: Beamer export: Executing LaTeX between two frames

2023-01-07 Thread M . ‘quintus’ Gülker
Dear Ihor,

please apologise the slow reply.

Am Sonntag, dem 26. Juni 2022 schrieb Ihor Radchenko:
> This is too hacky as for my taste.
>
> I'd rather use :ignore: tag from ox-extra:

This works decently. I did not know about “ox-extra” before. For
reference, it is here: 


What I then did was:

(require 'ox-extra)
(ox-extras-activate '(ignore-headlines))

And then export to latex-beamer as usual. Just like Ihor described, the
two headings tagged “:ignore:” are suppressed from the output and the
“\usebackgroundtemplate” macro is properly wrapped around the
non-ignored heading.

Thank you Ihor.

  -quintus

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



Re: Beamer export: Executing LaTeX between two frames

2022-06-26 Thread Fraga, Eric
On Sunday, 26 Jun 2022 at 12:17, Ihor Radchenko wrote:
> This is too hacky as for my taste.
>
> I'd rather use :ignore: tag from ox-extra:

Excellent.  I did not know that the ignore tag processing closed the
previous headline body as it seems to do given your example.  This
definitely makes things less hacky!

-- 
: Eric S Fraga, with org release_9.5.3-507-g4f0f24 in Emacs 29.0.50


Re: Beamer export: Executing LaTeX between two frames

2022-06-25 Thread Ihor Radchenko
"Fraga, Eric"  writes:

> On Tuesday, 21 Jun 2022 at 10:01, M. ‘quintus’ Gülker wrote:
>> 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
>
> This is a bit hacky but see attached file.  The trick is to end the
> previous frame explicitly, create the frame with the desired background,
> and then start explicitly a new frame but which is not shown in
> presentation mode.

This is too hacky as for my taste.

I'd rather use :ignore: tag from ox-extra:

* This is frame 1
* This is background wrapper, heading title ignored :ignore:
#+begin_export beamer
{\usebackgroundtemplate{\includegraphics[width=\paperwidth]{kitten.jpg}}%
#+end_export
* This is frame 2
* This is background ending :ignore:
#+begin_export beamer
}
#+end_export

The above exports to

\begin{document}

\begin{frame}{Outline}
\tableofcontents
\end{frame}

\begin{frame}[label={sec:orgea52eac}]{This is frame 1}
\end{frame}
{\usebackgroundtemplate{\includegraphics[width=\paperwidth]{kitten.jpg}}%
\begin{frame}[label={sec:org39b6485}]{This is frame 2}
\end{frame}
}
\end{document}

Best,
Ihor



Re: Beamer export: Executing LaTeX between two frames

2022-06-22 Thread Fraga, Eric
On Tuesday, 21 Jun 2022 at 10:01, M. ‘quintus’ Gülker wrote:
> 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

This is a bit hacky but see attached file.  The trick is to end the
previous frame explicitly, create the frame with the desired background,
and then start explicitly a new frame but which is not shown in
presentation mode.

The ending of the previous frame is fragile as there may be other
environments that should be closed so you will have to be careful.

Hope this helps.

-- 
: Eric S Fraga, with org release_9.5.3-507-g4f0f24 in Emacs 29.0.50


b.org
Description: b.org


Beamer export: Executing LaTeX between two frames

2022-06-21 Thread M . ‘quintus’ Gülker
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
. 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  | kont...@guelker.eu| O<