summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-11-17 20:47:04 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2012-11-17 20:55:26 (GMT)
commit626786c6eb52dc4106631b38b956f939f7df8d8a (patch)
tree9f6fbc7c73e4c47046d2535c03be479e0432345d
parentb58ce971446da2e907545261686d9fd51e563044 (diff)
downloadorg-mode-626786c6eb52dc4106631b38b956f939f7df8d8a.zip
org-mode-626786c6eb52dc4106631b38b956f939f7df8d8a.tar.gz
org-e-beamer: Add "fullframe" special environment
* contrib/lisp/org-e-beamer.el (org-e-beamer-environments-special): Add "fullframe" environment. Change access key for "againframe". (org-e-beamer--frame-level): "fullframe" environment also sets the frame level for the tree. (org-e-beamer--format-frame): Ignore headline title when environment is "fullframe". (org-e-beamer-select-environment): Change access key for "againframe".
-rw-r--r--contrib/lisp/org-e-beamer.el35
1 files changed, 21 insertions, 14 deletions
diff --git a/contrib/lisp/org-e-beamer.el b/contrib/lisp/org-e-beamer.el
index 89b7027..f303536 100644
--- a/contrib/lisp/org-e-beamer.el
+++ b/contrib/lisp/org-e-beamer.el
@@ -45,8 +45,9 @@
;; - Headlines become frames when their level is equal to
;; `org-e-beamer-frame-level' (or "H" value in the OPTIONS line).
;; Though, if an headline in the current tree has a "BEAMER_env"
-;; (see below) property set to "frame", its level overrides the
-;; variable.
+;; (see below) property set to either "frame" or "fullframe", its
+;; level overrides the variable. A "fullframe" is a frame with an
+;; empty (ignored) title.
;;
;; - All frames' children become block environments. Special block
;; types can be enforced by setting headline's "BEAMER_env" property
@@ -184,11 +185,12 @@ You might want to put e.g. \"allowframebreaks=0.9\" here."
"The column widths that should be installed as allowed property values.")
(defconst org-e-beamer-environments-special
- '(("againframe" "F")
+ '(("againframe" "A")
("appendix" "x")
("column" "c")
("columns" "C")
("frame" "f")
+ ("fullframe" "F")
("ignoreheading" "i")
("note" "n")
("noteNH" "N"))
@@ -372,19 +374,22 @@ INFO is a plist used as a communication channel."
;; farthest.
(catch 'exit
(mapc (lambda (parent)
- (when (equal (org-element-property :beamer-env parent) "frame")
- (throw 'exit (org-export-get-relative-level parent info))))
- (reverse (org-export-get-genealogy headline)))
+ (let ((env (org-element-property :beamer-env parent)))
+ (when (and env (member (downcase env) '("frame" "fullframe")))
+ (throw 'exit (org-export-get-relative-level parent info)))))
+ (nreverse (org-export-get-genealogy headline)))
nil)
;; 2. Look for "frame" environment in HEADLINE.
- (and (equal (org-element-property :beamer-env headline) "frame")
- (org-export-get-relative-level headline info))
+ (let ((env (org-element-property :beamer-env headline)))
+ (and env (member (downcase env) '("frame" "fullframe"))
+ (org-export-get-relative-level headline info)))
;; 3. Look for "frame" environment in sub-tree.
(org-element-map
headline 'headline
(lambda (hl)
- (when (equal (org-element-property :beamer-env hl) "frame")
- (org-export-get-relative-level hl info)))
+ (let ((env (org-element-property :beamer-env hl)))
+ (when (and env (member (downcase env) '("frame" "fullframe")))
+ (org-export-get-relative-level hl info))))
info 'first-match)
;; 4. No "frame" environment in tree: use default value.
(plist-get info :headline-levels)))
@@ -454,9 +459,11 @@ used as a communication channel."
",")
'option))
;; Title.
- (format "{%s}"
- (org-export-data (org-element-property :title headline)
- info))
+ (let ((env (org-element-property :beamer-env headline)))
+ (format "{%s}"
+ (if (and env (equal (downcase env) "fullframe")) ""
+ (org-export-data
+ (org-element-property :title headline) info))))
"\n"
;; The following workaround is required in fragile frames
;; as Beamer will append "\par" to the beginning of the
@@ -1110,7 +1117,7 @@ aid, but the tag does not have any semantic meaning."
(org-delete-property "BEAMER_col")))
;; For an "againframe" section, automatically ask for reference
;; to resumed frame and overlay specifications.
- ((eq org-last-tag-selection-key ?F)
+ ((eq org-last-tag-selection-key ?A)
(if (equal (org-entry-get nil "BEAMER_env") "againframe")
(progn (org-entry-delete nil "BEAMER_env")
(org-entry-delete nil "BEAMER_ref")