* Beamer export: How to handle overlayarea
@ 2013-10-21 7:52 James Harkins
2013-10-21 8:49 ` Sebastien Vauban
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: James Harkins @ 2013-10-21 7:52 UTC (permalink / raw)
To: orgmode
Per the beamer user guide, the syntax of the overlayarea environment is:
\begin{overlayarea}{area width}{area height}
environment contents
\end{overlayarea}
I can't figure out how to get the width and height in properly.
From the customize interface, I added overlayarea as follows:
'(org-beamer-environments-extra (quote (("CJK" "Z" "\\begin{CJK}%a%H"
"\\end{CJK}") ("onlyenv" "O" "\\begin{onlyenv}%a" "\\end{onlyenv}")
("overlayarea" "Y" "\\begin{overlayarea}%o%a" "\\end{overlayarea}"))))
And I can plug text into %o using the BEAMER_OPT property:
*** Overlays :B_overlayarea:
:PROPERTIES:
:BEAMER_env: overlayarea
:BEAMER_OPT: {0.9\textwidth}{0.7\textheight}
:END:
-->
\begin{overlayarea}[{0.9\textwidth}{0.7\textheight}]
Oh, hello, BEAMER_OPT automatically adds square brackets, how charming.
I guess I can hack up a filter to remove the brackets after overlayarea.
.. 45 minutes after I started writing this email...
I copied someone else's ignoreheading filter and modified it for this
purpose:
(defun hjh-overlayarea (contents backend info)
"Remove brackets from options for overlayarea."
(when (and (org-export-derived-backend-p backend 'latex 'html 'ascii)
(string-match "\\\\begin{overlayarea}\\[\\(.*\\)\\]"
(downcase contents)))
(replace-match "\\\\begin{overlayarea}\\1" nil nil contents)))
Replace-match's handling of backslashes threw me at first, but this appears
to work.
Still, I wonder if there shouldn't be, e.g., %O for
options-without-brackets. Because that was 45 minutes I spent NOT writing
my slides :-|
Also, side note, [1] seems not to document BEAMER_OPT for environments
within a frame. Reading this page, you would think you could only use it
for frames. I had to dig into the source code to find how to populate %o.
hjh
[1] http://orgmode.org/worg/exporters/beamer/ox-beamer.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Beamer export: How to handle overlayarea
2013-10-21 7:52 Beamer export: How to handle overlayarea James Harkins
@ 2013-10-21 8:49 ` Sebastien Vauban
2013-10-21 10:02 ` Suvayu Ali
2013-10-21 10:12 ` Nicolas Goaziou
2 siblings, 0 replies; 8+ messages in thread
From: Sebastien Vauban @ 2013-10-21 8:49 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello James,
James Harkins wrote:
> Per the beamer user guide, the syntax of the overlayarea environment is:
>
> \begin{overlayarea}{area width}{area height}
> environment contents
> \end{overlayarea}
>
> I can't figure out how to get the width and height in properly.
Have a look at
http://lists.gnu.org/archive/html/emacs-orgmode/2013-06/msg00922.html.
You see you could use ":options". HTH.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Beamer export: How to handle overlayarea
2013-10-21 7:52 Beamer export: How to handle overlayarea James Harkins
2013-10-21 8:49 ` Sebastien Vauban
@ 2013-10-21 10:02 ` Suvayu Ali
2013-10-21 10:12 ` Nicolas Goaziou
2 siblings, 0 replies; 8+ messages in thread
From: Suvayu Ali @ 2013-10-21 10:02 UTC (permalink / raw)
To: emacs-orgmode
On Mon, Oct 21, 2013 at 03:52:14PM +0800, James Harkins wrote:
>
> Also, side note, [1] seems not to document BEAMER_OPT for environments
> within a frame. Reading this page, you would think you could only use it for
> frames. I had to dig into the source code to find how to populate %o.
>
> hjh
>
> [1] http://orgmode.org/worg/exporters/beamer/ox-beamer.html
>
This page has not been updated in a long time. It was written before
there was a section on the new beamer exporter in the manual. I don't
have the time at the moment, I won't have time in the coming months
either. So if you have ideas about how to improve the article, please
feel free to add.
Cheers,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Beamer export: How to handle overlayarea
2013-10-21 7:52 Beamer export: How to handle overlayarea James Harkins
2013-10-21 8:49 ` Sebastien Vauban
2013-10-21 10:02 ` Suvayu Ali
@ 2013-10-21 10:12 ` Nicolas Goaziou
2013-10-21 10:52 ` James Harkins
2 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2013-10-21 10:12 UTC (permalink / raw)
To: James Harkins; +Cc: orgmode
Hello,
James Harkins <jamshark70@gmail.com> writes:
> Per the beamer user guide, the syntax of the overlayarea environment is:
>
> \begin{overlayarea}{area width}{area height}
> environment contents
> \end{overlayarea}
>
> I can't figure out how to get the width and height in properly.
>
> From the customize interface, I added overlayarea as follows:
>
> '(org-beamer-environments-extra (quote (("CJK" "Z" "\\begin{CJK}%a%H"
> "\\end{CJK}") ("onlyenv" "O" "\\begin{onlyenv}%a" "\\end{onlyenv}")
> ("overlayarea" "Y" "\\begin{overlayarea}%o%a" "\\end{overlayarea}"))))
>
> And I can plug text into %o using the BEAMER_OPT property:
>
> *** Overlays :B_overlayarea:
> :PROPERTIES:
> :BEAMER_env: overlayarea
> :BEAMER_OPT: {0.9\textwidth}{0.7\textheight}
> :END:
>
> -->
>
> \begin{overlayarea}[{0.9\textwidth}{0.7\textheight}]
>
> Oh, hello, BEAMER_OPT automatically adds square brackets, how
> charming.
Optional arguments are in square brackets in LaTeX. Try %r instead, so
you can write:
*** {0.9\textwidth}{0.7\textheight} :B_overlayarea:
:PROPERTIES:
:BEAMER_env: overlayarea
:END:
> Still, I wonder if there shouldn't be, e.g., %O for
> options-without-brackets. Because that was 45 minutes I spent NOT
> writing my slides :-|
Options without brackets are not options anymore, but random arguments.
> Also, side note, [1] seems not to document BEAMER_OPT for environments
> within a frame. Reading this page, you would think you could only use
> it for frames. I had to dig into the source code to find how to
> populate %o.
Would you mind suggesting a better phrasing?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Beamer export: How to handle overlayarea
2013-10-21 10:12 ` Nicolas Goaziou
@ 2013-10-21 10:52 ` James Harkins
2013-10-23 16:59 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: James Harkins @ 2013-10-21 10:52 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]
On Oct 21, 2013 6:12 PM, "Nicolas Goaziou" <n.goaziou@gmail.com> wrote:
> Optional arguments are in square brackets in LaTeX. Try %r instead, so
> you can write:
>
> *** {0.9\textwidth}{0.7\textheight} :B_overlayarea:
> :PROPERTIES:
> :BEAMER_env: overlayarea
> :END:
Ah, OK, that's better.
It's not easy to grasp the correct terminology and structure from the
available documentation. I do appreciate the excellent help from the list
in such cases!
This part of the documentation might benefit from some examples of
generating different types of beamer syntax -- when to use properties, when
to use headline text, etc. I wouldn't have guessed to use the headline text
because I was thinking of parameters or arguments.
> > Also, side note, [1] seems not to document BEAMER_OPT for environments
> > within a frame. Reading this page, you would think you could only use
> > it for frames. I had to dig into the source code to find how to
> > populate %o.
>
> Would you mind suggesting a better phrasing?
Under "Block environments and overlay specifications," where it discusses
custom environments, I would add:
~~
- Environment options may be given using the BEAMER_opt property. They will
be enclosed in square brackets and inserted where %o appears in the
environment definition.
(with an example, but I can't think of one now)
- Additional arguments may be written into the environment's headline, and
inserted into the LaTeX string using %r (raw headline text, no processing).
~~
I think it's important to mention it in the section where it can be used.
My faulty conclusion was based on the fact that the only mention of _opt is
in a section about frames.
hjh
hjh
[-- Attachment #2: Type: text/html, Size: 2095 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Beamer export: How to handle overlayarea
2013-10-21 10:52 ` James Harkins
@ 2013-10-23 16:59 ` Nicolas Goaziou
2013-10-24 0:43 ` James Harkins
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2013-10-23 16:59 UTC (permalink / raw)
To: jamshark70; +Cc: orgmode
Hello,
James Harkins <jamshark70@gmail.com> writes:
> Under "Block environments and overlay specifications," where it discusses
> custom environments, I would add:
>
> ~~
> - Environment options may be given using the BEAMER_opt property. They will
> be enclosed in square brackets and inserted where %o appears in the
> environment definition.
> (with an example, but I can't think of one now)
>
> - Additional arguments may be written into the environment's headline, and
> inserted into the LaTeX string using %r (raw headline text, no processing).
> ~~
There are two things to consider: what belongs to the manual, and what
belongs to `org-beamer-environments-extra' docstring.
I think it is reasonable for the manual not to talk about %o, %r... but,
instead, simply point to the variable name.
> I think it's important to mention it in the section where it can be used.
> My faulty conclusion was based on the fact that the only mention of _opt is
> in a section about frames.
Then what about changing
Headlines also support 'BEAMER_ACT' and 'BEAMER_OPT' properties. The
former is translated as an overlay/action specification, or a default
overlay specification when enclosed within square brackets. The latter
specifies options for the current frame.
into something like
Headlines also support 'BEAMER_ACT' and 'BEAMER_OPT' properties. The
former is translated as an overlay/action specification, or a default
overlay specification when enclosed within square brackets. The latter
specifies options for the current frame or block, and will automatically
be enclosed within square brackets.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Beamer export: How to handle overlayarea
2013-10-23 16:59 ` Nicolas Goaziou
@ 2013-10-24 0:43 ` James Harkins
2013-10-24 10:53 ` Suvayu Ali
0 siblings, 1 reply; 8+ messages in thread
From: James Harkins @ 2013-10-24 0:43 UTC (permalink / raw)
To: Nicolas Goaziou, Emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]
On Oct 24, 2013 12:58 AM, "Nicolas Goaziou" <n.goaziou@gmail.com> wrote:
> There are two things to consider: what belongs to the manual, and what
> belongs to `org-beamer-environments-extra' docstring.
>
> I think it is reasonable for the manual not to talk about %o, %r... but,
> instead, simply point to the variable name.
OK.
> Headlines also support 'BEAMER_ACT' and 'BEAMER_OPT' properties. The
> former is translated as an overlay/action specification, or a default
> overlay specification when enclosed within square brackets. The latter
> specifies options for the current frame or block, and will automatically
> be enclosed within square brackets.
That would help.
I'd still like to see something more like a "for-dummies" explanation of
passing options and arguments to LaTeX entities. I'm not saying the
documentation is woefully inadequate (hardly that -- Suvayu's page got me
rather far, and I got stuck on a couple of details). My experience was: it
never would have occurred to me on my own to use the headline text for
LaTeX code, and if there was a hint anywhere in the docs to suggest that
this would be the way to go, I didn't find it. That's a conceptual leap
that passed me by.
FWIW, I often raise a similar point among SuperCollider devs, noting that
we generally do a decent job of documenting class interfaces, but not such
a great job of explaining to people who don't eat, breathe and sleep SC how
to put the pieces together. That leads to questions such as [1] on the
mailing list. Really basic use case, but this competent user is confused...
meaning, the collective docs aren't doing a thorough job.
This sort of doc would be appropriate for worg, but probably not the
manual. If I have time while traveling, I'll draft up a few paragraphs --
but I don't know all the implementation details so I'd certainly need
another pair of eyes.
hjh
[1] http://article.gmane.org/gmane.comp.audio.supercollider.user/102850
[-- Attachment #2: Type: text/html, Size: 2397 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Beamer export: How to handle overlayarea
2013-10-24 0:43 ` James Harkins
@ 2013-10-24 10:53 ` Suvayu Ali
0 siblings, 0 replies; 8+ messages in thread
From: Suvayu Ali @ 2013-10-24 10:53 UTC (permalink / raw)
To: emacs-orgmode
Hi James,
On Thu, Oct 24, 2013 at 08:43:59AM +0800, James Harkins wrote:
> On Oct 24, 2013 12:58 AM, "Nicolas Goaziou" <n.goaziou@gmail.com> wrote:
> > Headlines also support 'BEAMER_ACT' and 'BEAMER_OPT' properties. The
> > former is translated as an overlay/action specification, or a default
> > overlay specification when enclosed within square brackets. The latter
> > specifies options for the current frame or block, and will automatically
> > be enclosed within square brackets.
>
> That would help.
>
> I'd still like to see something more like a "for-dummies" explanation of
> passing options and arguments to LaTeX entities. I'm not saying the
> documentation is woefully inadequate (hardly that -- Suvayu's page got me
> rather far, and I got stuck on a couple of details). My experience was: it
> never would have occurred to me on my own to use the headline text for
> LaTeX code, and if there was a hint anywhere in the docs to suggest that
> this would be the way to go, I didn't find it. That's a conceptual leap
> that passed me by.
I think I agree with you on this. It is a conceptual leap. I'll add a
TODO item on that Worg page about these kind of tricks.
Cheers,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-24 10:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 7:52 Beamer export: How to handle overlayarea James Harkins
2013-10-21 8:49 ` Sebastien Vauban
2013-10-21 10:02 ` Suvayu Ali
2013-10-21 10:12 ` Nicolas Goaziou
2013-10-21 10:52 ` James Harkins
2013-10-23 16:59 ` Nicolas Goaziou
2013-10-24 0:43 ` James Harkins
2013-10-24 10:53 ` Suvayu Ali
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).