From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Kauffman Subject: Property inheritance in beamer export [7.4] Date: Fri, 11 Nov 2011 04:34:23 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROizH-00035R-6o for emacs-orgmode@gnu.org; Thu, 10 Nov 2011 23:45:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROizF-00035z-KJ for emacs-orgmode@gnu.org; Thu, 10 Nov 2011 23:45:11 -0500 Received: from lo.gmane.org ([80.91.229.12]:58880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROizF-00035Y-9u for emacs-orgmode@gnu.org; Thu, 10 Nov 2011 23:45:09 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ROizD-0005oP-PS for emacs-orgmode@gnu.org; Fri, 11 Nov 2011 05:45:08 +0100 Received: from 67-6-86-129.mpls.qwest.net ([67.6.86.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Nov 2011 05:45:07 +0100 Received: from kauffman77 by 67-6-86-129.mpls.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Nov 2011 05:45:07 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I use org for constructing simple slide presentations quite a bit. I'd like to be able to set a global property which shrinks all text to fit in the allotted space; this is great for source examples. After some experimentation I put #+PROPERTY: BEAMER_envargs [shrink] in the preamble and evaluated (set-variable (quote org-use-property-inheritance) t nil) According to my understanding of the documentation, this should make very outline entry inherit the property BEAMER_envargs, regardless of whether it has a properties list itself. After reloading the file, internally this seems to work fine: I move to any heading and eval the following lisp (org-entry-get (point) "BEAMER_envargs" 1) which gives the result "[shrink]". However, on exporting the org file to pdf, the shrinking does not seem to happen. The source code runs off the page. Is property inheritance not respected during export? Cheers, Chris --Example .org File--- #+TITLE: Java Lecture #+AUTHOR: Christopher Kauffman #+EMAIL: kauffman77@gmail.com #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+STARTUP: beamer #+STARTUP: showall #+LaTeX_CLASS: beamer #+BEAMER_FRAME_LEVEL: 1 #+PROPERTY: BEAMER_envargs [shrink] * Example Want this shrink #+BEGIN_SRC java public class Mouse{ private int age = 0; // age of mouse in days private double weight = 1.0; // weight of mouse in grams private double percentGrowthRate; // % weight increase per day // This method assigns the mouse's percent growth rate. public void setPercentGrowthRate(double percentGrowthRate) { this.percentGrowthRate = percentGrowthRate; } // This method simulates one day of growth for the mouse. public void grow() { this.weight += (.01 * this.percentGrowthRate * this.weight); this.age++; } // This method prints the mouses's age and weight. public void display() { System.out.printf( "Age = %d, weight = %.3f\n", this.age, this.weight); } } #+END_SRC * Example :PROPERTIES: :BEAMER_envargs: [shrink] :END: Must add properties every time #+BEGIN_SRC java public class Mouse{ private int age = 0; // age of mouse in days private double weight = 1.0; // weight of mouse in grams private double percentGrowthRate; // % weight increase per day // This method assigns the mouse's percent growth rate. public void setPercentGrowthRate(double percentGrowthRate) { this.percentGrowthRate = percentGrowthRate; } // This method simulates one day of growth for the mouse. public void grow() { this.weight += (.01 * this.percentGrowthRate * this.weight); this.age++; } // This method prints the mouses's age and weight. public void display() { System.out.printf( "Age = %d, weight = %.3f\n", this.age, this.weight); } } #+END_SRC --END EXAMPLE- current state: ============== (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-files '("~/mypubs/worklog") org-agenda-window-setup 'other-window org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) outline-mode-hook '((lambda nil (local-set-key "\356" (quote outline-next-visible-heading)) (local-set-key "\360" (quote outline-previous-visible-heading)) (local-set-key (quote [f12]) (quote ck-outline-toggle))) ) org-babel-pre-tangle-hook '(save-buffer) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-mode-hook '((lambda nil (local-set-key "d" (quote insert-date-heading)) (local-set-key "" (quote org-agenda)) (local-set-key "\232" (quote format-float-column)) (local-set-key "e" (quote org-example)) (local-set-key "v" (quote org-verbatim)) (local-set-key "q" (quote org-quote)) (auto-fill-mode 1) (setq org-agenda-window-setup (quote other-window))) #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp "\\" org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) )