emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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

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).