* org-beamer feaure request : single frame background
@ 2011-05-25 10:33 Sander Boer
2011-05-25 16:06 ` suvayu ali
0 siblings, 1 reply; 4+ messages in thread
From: Sander Boer @ 2011-05-25 10:33 UTC (permalink / raw)
To: emacs-orgmode
Hi all,
I've found that this has come up in the past, with no real solution.
I have found a workaround though.
First the issue at hand:
Beamer allows for setting the background image by setting
setbeamertemplate *outside* of the frame environment:
#### begin tex src snippet
% preamble
{ % by enclosing it in a tex environment
%the background is set only for this frame
\setbeamertemplate{background canvas}{
\includegraphics[width=\paperwidth]{./myImage.jpg}
}
\begin{frame}
\frametitle{Outline}
\setcounter{tocdepth}{3}
\tableofcontents
\end{frame}
}` % end tex env
#### end tex src snippet
A quick look at org-beamer.el makes me think that there is no
infrastructure in place that accounts for enclosing each frame in its
own tex environment, although I think that would be trivial.
Less trivial for me is what kind of structure should be in place that
inserts the code before the frame.
A property for sure...
Any thoughts on this ?
Anyway, the workaround is using the "wallpaper" package and set the
beamer background canvas to nil:
\usepackage{wallpaper}
\setbeamercolor{background canvas}{bg=}
then in org:
* my slide title:
\ThisCenterWallPaper{1}{myImage.jpg} % first argument is scaling
But, a solid Org-beamer implementation like described above is preferred...
Sander
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-beamer feaure request : single frame background
2011-05-25 10:33 org-beamer feaure request : single frame background Sander Boer
@ 2011-05-25 16:06 ` suvayu ali
2011-05-26 10:08 ` Sander Boer
0 siblings, 1 reply; 4+ messages in thread
From: suvayu ali @ 2011-05-25 16:06 UTC (permalink / raw)
To: Sander Boer; +Cc: emacs-orgmode
On Wed, May 25, 2011 at 3:33 AM, Sander Boer <sanderboer@yahoo.com> wrote:
> A quick look at org-beamer.el makes me think that there is no infrastructure
> in place that accounts for enclosing each frame in its own tex environment,
> although I think that would be trivial.
You can try (untested):
#+LATEX: { %}
* This is a frame
The commented out closing brace is important. Otherwise the exporter
gets confused.
#+LATEX: }
The other option might be to write your own function and add it to one
of the export hooks.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-beamer feaure request : single frame background
2011-05-25 16:06 ` suvayu ali
@ 2011-05-26 10:08 ` Sander Boer
2011-05-26 18:15 ` suvayu ali
0 siblings, 1 reply; 4+ messages in thread
From: Sander Boer @ 2011-05-26 10:08 UTC (permalink / raw)
To: emacs-orgmode
suvayu ali <fatkasuvayu+linux@gmail.com> writes:
> You can try (untested):
>
> #+LATEX: { %}
>
> * This is a frame
> The commented out closing brace is important. Otherwise the exporter
> gets confused.
>
> #+LATEX: }
>
This will not work as it is by definition inserted between \begin{frame}...\end{frame}
like thus:
\begin{frame}
.........
{
\end{frame}
\begin{frame}
.........
}
\end{frame}
I think it it possible to write a function that prepends
"{\myfunction..etc " and appends "}" to the frame environment.
For the time being a property like "BEAMER_BG: myfile.jpg" could be
harvested and transformed into:
{
\setbeamertemplate{background canvas}{
\includegraphics[width=\paperwidth]{./myfile.jpg}
\begin{frame}
.........
\end{frame}
}
The latex code could be a bit more elaborate and the image placement
attributes need some automagic, but as a proof of concept, this will do.
I do think I need a little help with this though, as I have no clue
about org's inner workings.
But let's take it one step at a time, like how does one harvest the
"BEAMER_BG: myfile.jpg" property ?
sndr
--
Me thinks:
You have an unusual equipment for success. Be sure to use it properly.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-beamer feaure request : single frame background
2011-05-26 10:08 ` Sander Boer
@ 2011-05-26 18:15 ` suvayu ali
0 siblings, 0 replies; 4+ messages in thread
From: suvayu ali @ 2011-05-26 18:15 UTC (permalink / raw)
To: Sander Boer; +Cc: emacs-orgmode
I see the limitation of my suggestion one now. I guess the only way is
option two then.
On Thu, May 26, 2011 at 3:08 AM, Sander Boer <sanderboer@yahoo.com> wrote:
> I think it it possible to write a function that prepends
> "{\myfunction..etc " and appends "}" to the frame environment.
> For the time being a property like "BEAMER_BG: myfile.jpg" could be
> harvested and transformed into:
>
> {
> \setbeamertemplate{background canvas}{
> \includegraphics[width=\paperwidth]{./myfile.jpg}
>
> \begin{frame}
> .........
> \end{frame}
> }
>
> The latex code could be a bit more elaborate and the image placement
> attributes need some automagic, but as a proof of concept, this will do.
>
> I do think I need a little help with this though, as I have no clue
> about org's inner workings.
> But let's take it one step at a time, like how does one harvest the
> "BEAMER_BG: myfile.jpg" property ?
>
This page from the manual might help you.
http://orgmode.org/manual/Using-the-property-API.html#Using-the-property-API
A combination of getting the properties with the property API and
adding your own function in the post export hook might be the easiest
solution here.
> sndr
>
Good luck, and do post back to the list if you find a solution, I
would be interested.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-26 18:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 10:33 org-beamer feaure request : single frame background Sander Boer
2011-05-25 16:06 ` suvayu ali
2011-05-26 10:08 ` Sander Boer
2011-05-26 18:15 ` suvayu ali
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.