* Beamer export with \only overlays - how?
@ 2013-10-08 15:41 James Harkins
2013-10-08 17:42 ` Suvayu Ali
0 siblings, 1 reply; 5+ messages in thread
From: James Harkins @ 2013-10-08 15:41 UTC (permalink / raw)
To: emacs-orgmode
Question: How does one use Beamer's \only command with blocks? (Successfully, with org-mode's beamer export, I mean.)
I found in the manual that you can give an overlay specification using the BEAMER_ACT property... ok... but that's not the same as \only because, when a latex chunk is marked \only<1>, it takes *no space* on <2->. Using <1> and <2> causes the <2> to appear lower than the <1>. That's not what I want.
Hacking it with #+latex: lines is even worse, as explained in the example below.
I suppose there must be a way to do it, albeit undocumented. Or maybe it's simply not supported, in which case I would have to write the LaTeX directly. Annoying, but I'll do that if there's no alternative.
hjh
#+LANGUAGE: en
#+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t ':t
#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_THEME: default
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC
* Section
** Frame (beamer_act, not quite right)
*** The problem on this frame
I want Block 1 and Block 2 to occupy the same space on successive slides.
*** Block 1 :B_block:
:PROPERTIES:
:BEAMER_env: block
:BEAMER_ACT: <1>
:END:
*** Block 2 :B_block:
:PROPERTIES:
:BEAMER_env: block
:BEAMER_ACT: <2>
:END:
** Frame (using #+latex and \only)
*** This is a complete bloody hash.
There is no way to make \verb|\only<2>| come after \verb|\end{block}|.
#+latex: \only<1> {
*** Block 1
#+latex: } \only<2> {
*** Block 2
#+latex: }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Beamer export with \only overlays - how?
2013-10-08 15:41 Beamer export with \only overlays - how? James Harkins
@ 2013-10-08 17:42 ` Suvayu Ali
2013-10-09 2:28 ` James Harkins
0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2013-10-08 17:42 UTC (permalink / raw)
To: emacs-orgmode
On Tue, Oct 08, 2013 at 11:41:36PM +0800, James Harkins wrote:
> Question: How does one use Beamer's \only command with blocks? (Successfully, with org-mode's beamer export, I mean.)
>
> I found in the manual that you can give an overlay specification using
> the BEAMER_ACT property... ok... but that's not the same as \only
> because, when a latex chunk is marked \only<1>, it takes *no space* on
> <2->. Using <1> and <2> causes the <2> to appear lower than the
> <1>. That's not what I want.
>
Did you try this:
<http://orgmode.org/worg/exporters/beamer/ox-beamer.html#environments-overlay>
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Beamer export with \only overlays - how?
2013-10-08 17:42 ` Suvayu Ali
@ 2013-10-09 2:28 ` James Harkins
2013-10-09 7:23 ` Suvayu Ali
0 siblings, 1 reply; 5+ messages in thread
From: James Harkins @ 2013-10-09 2:28 UTC (permalink / raw)
To: emacs-orgmode
Suvayu Ali <fatkasuvayu+linux <at> gmail.com> writes:
> On Tue, Oct 08, 2013 at 11:41:36PM +0800, James Harkins wrote:
> > Question: How does one use Beamer's \only command with blocks?
(Successfully, with org-mode's beamer
> export, I mean.)
> >
> > I found in the manual that you can give an overlay specification using
> > the BEAMER_ACT property... ok... but that's not the same as \only
> > because, when a latex chunk is marked \only<1>, it takes *no space* on
> > <2->. Using <1> and <2> causes the <2> to appear lower than the
> > <1>. That's not what I want.
> >
>
> Did you try this:
>
> <http://orgmode.org/worg/exporters/beamer/ox-beamer.html#environments-overlay>
My example file uses BEAMER_ACT, so yes, I did try that. Here's what happens
if I try it with \only<1>.
#+LANGUAGE: en
#+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t ':t
#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_THEME: default
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col)
%8BEAMER_opt(Opt)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC
* Section
** Frame (beamer_act, not quite right)
*** The problem on this frame
I want Block 1 and Block 2 to occupy the same space on successive slides.
*** Block 1 :B_block:
:PROPERTIES:
:BEAMER_env: block
:BEAMER_ACT: \only<1>
:END:
*** Block 2 :B_block:
:PROPERTIES:
:BEAMER_env: block
:BEAMER_ACT: \only<2>
:END:
-->
\begin{block}<\only<1>>{Block 1}
\end{block}
Where the correct syntax would be:
\only<1>{
\begin{block}{Block 1}
\end{block}
}
So in short, no, that doesn't help.
I'm getting the uncomfortable feeling that this is a use case that org just
doesn't support as yet.
Actually, reading further in the beamer user guide, I noticed last night
that what I really want is \overlayarea, e.g.:
\begin{overlayarea}{\textwidth}{3cm}
\only<1>{Some text for the first slide.\\Possibly several lines long.}
\only<2>{Replacement on the second slide.}
\end{overlayarea}
Unfortunately \overlayarea is not supported as a BEAMER_env:
*** dummy :B_overlayarea:
:PROPERTIES:
:BEAMER_env: overlayarea
:BEAMER_envargs: {\textwidth}{3cm}
:END:
There's no \begin{overlayarea} or \end{overlayarea} anywhere in the exported
code.
Oh, forgot: org-version says Org-mode version 8.2 (release_8.2-1-g025bb7 @
/home/dlm/share/org-mode.git/lisp/).
hjh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Beamer export with \only overlays - how?
2013-10-09 2:28 ` James Harkins
@ 2013-10-09 7:23 ` Suvayu Ali
2013-10-10 1:16 ` James Harkins
0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2013-10-09 7:23 UTC (permalink / raw)
To: emacs-orgmode
On Wed, Oct 09, 2013 at 02:28:30AM +0000, James Harkins wrote:
> Suvayu Ali <fatkasuvayu+linux <at> gmail.com> writes:
>
> > On Tue, Oct 08, 2013 at 11:41:36PM +0800, James Harkins wrote:
> > > Question: How does one use Beamer's \only command with blocks?
> (Successfully, with org-mode's beamer
> > export, I mean.)
> > >
> > > I found in the manual that you can give an overlay specification using
> > > the BEAMER_ACT property... ok... but that's not the same as \only
> > > because, when a latex chunk is marked \only<1>, it takes *no space* on
> > > <2->. Using <1> and <2> causes the <2> to appear lower than the
> > > <1>. That's not what I want.
> > >
> >
> > Did you try this:
> >
> > <http://orgmode.org/worg/exporters/beamer/ox-beamer.html#environments-overlay>
>
> My example file uses BEAMER_ACT, so yes, I did try that. Here's what happens
> if I try it with \only<1>.
Look a bit more carefully ;). The following paragraph has an example
suggesting the onlyenv environment. As far as I understand,
environments are prefered over commands with arguments or macros when
translating headlines. You can nest your block in such an environment.
I realise this is a little less flexible than \only{}, but it seems to
work. I have not tried any of this personally in a long time though.
Hope this helps,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Beamer export with \only overlays - how?
2013-10-09 7:23 ` Suvayu Ali
@ 2013-10-10 1:16 ` James Harkins
0 siblings, 0 replies; 5+ messages in thread
From: James Harkins @ 2013-10-10 1:16 UTC (permalink / raw)
To: emacs-orgmode
Suvayu Ali <fatkasuvayu+linux <at> gmail.com> writes:
> Look a bit more carefully ;). The following paragraph has an example
> suggesting the onlyenv environment. As far as I understand,
> environments are prefered over commands with arguments or macros when
> translating headlines. You can nest your block in such an environment.
> I realise this is a little less flexible than \only{}, but it seems to
> work. I have not tried any of this personally in a long time though.
Indeed, this does the job. Thanks for the extra pointer.
For future readers, now I have this in my .emacs:
(add-to-list 'org-beamer-environments-extra
'("onlyenv" "O" "\\begin{onlyenv}%a" "\\end{onlyenv}"))
And then I can export:
** Frame (beamer_act, not quite right)
*** The problem on this frame
I want Block 1 and Block 2 to occupy the same space on successive
slides.
*** OnlyEnv 1
:B_onlyenv:
:PROPERTIES:
:BEAMER_env: onlyenv
:BEAMER_ACT: <1>
:END:
**** Block 1
Text
*** OnlyEnv 2
:B_onlyenv:
:PROPERTIES:
:BEAMER_env: onlyenv
:BEAMER_ACT: <2>
:END:
**** Block 2
Text 2
-->
\begin{frame}[label=sec-1-1]{Frame (beamer$_{\text{act}}$, not quite right)}
\begin{block}{The problem on this frame}
I want Block 1 and Block 2 to occupy the same space on successive slides.
\end{block}
\begin{onlyenv}<1>
\begin{block}{Block 1}
Text
\end{block}
\end{onlyenv}
\begin{onlyenv}<2>
\begin{block}{Block 2}
Text 2
\end{block}
\end{onlyenv}
\end{frame}
~~~
I think I overlooked this in the manual because the overlay section is not
organized around (what I think are) the most important user questions:
- Which overlays does org beamer export support?
- How to use them?
Instead, "onlyenv" appears in a paragraph whose topic sentence is "You can
add your own environments by..." In other words, the information is "there,"
but organized in a way that would make your middle school English teacher
break out the red pen.
I'll add a TODO for myself to rewrite this section. I don't know when I can
get to it, though.
~~~
Why is onlyenv not supported out of the box?
hjh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-10 1:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 15:41 Beamer export with \only overlays - how? James Harkins
2013-10-08 17:42 ` Suvayu Ali
2013-10-09 2:28 ` James Harkins
2013-10-09 7:23 ` Suvayu Ali
2013-10-10 1:16 ` James Harkins
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.