John Hendy <jw.he...@gmail.com> wrote: > On Mon, Mar 12, 2012 at 4:48 PM, Nick Dokos <nicholas.do...@hp.com> wrote: > > John Hendy <jw.he...@gmail.com> wrote: > > > >> I use beamer a lot for work and decided to create a beamer-specific > >> setupfile to clean up my org files a bit. My files typically contain a > >> header like so: > >> > >> --- > >> #+latex_class: beamer > >> #+startup: beamer > >> #+options: toc:nil latex:t tex:t > >> #+latex_class_options: [presentation,bigger] > >> #+beamer_frame_level: 1 > >> #+beamer_header_extra: > >> \usetheme[alternativetitlepage=true,titleline=true,titlepagelogo=../pics/pic.jpg]{Torino} > >> #+beamer_header_extra: \usecolortheme{freewilly} > >> > >> #+latex_header: \usepackage{tikz} > >> #+latex_header: > >> \usetikzlibrary{decorations,arrows,automata,positioning,backgrounds} > >> > >> #+latex_header: \usepackage{setspace} > >> #+latex_header: \setstretch{1.3} > >> > >> #+latex_header: \usepackage{lmodern} > >> #+latex_header: \usepackage{booktabs} > >> #+AUTHOR: John Henderson > >> --- > >> > >> I tried inserting the above into a file called =beamer-setup.org= and > >> simply doing: > >> --- > >> #+setupfile: ~/org/aux/beamer-setup.org > >> --- > >> > >> This doesn't seem to work, however. My theme doesn't get picked up, > >> for example. If I put the contents into the file directly, I'm all > >> set. Any suggestions on why this might be the case? > >> > > > > C-c C-c on the setupfile line? The doc says > > > > ,---- > > | `#+SETUPFILE: file' > > | This line defines a file that holds more in-buffer setup. > > | Normally this is entirely ignored. Only when the buffer is parsed > > | for option-setting lines (i.e. when starting Org mode for a file, > > | when pressing `C-c C-c' in a settings line, or when exporting), > > | then the contents of this file are parsed as if they had been > > | included in the buffer. In particular, the file can be any other > > | Org mode file with internal setup. You can visit the file the > > | cursor is in the line with `C-c ''. > > `---- > > > > and when I try the export, it fails to find "freewilly.sty" (no surprise > > there), which seems to show that the file *is* processed. > > Yeah, I should have just posted an example with an included theme > instead of the one I usually use. I think I tracked it down. First, I > added =t= to the list of class options: > --- > #+latex_class_options: [t,presentation,bigger] > --- > > I saw an effect on my frame alignment, which told me things were, > indeed, being read. It seems the issue was with using > #+beamer_header_extra. I don't know what that's supposed to be for, > but it isn't picking up the theme option. Actually... in searching for > what it's supposed to be used for, I ran across a mailing list post of > the same problem: > -- http://lists.gnu.org/archive/html/emacs-orgmode/2010-09/msg01011.html > > Indeed, ditching beamer_header_extra for the theme setting and just > using #+latex_header... works. > > Thoughts on fixing this? > >
The beamer exporter is searching the original file for #+BEAMER_* stuff, not the setup file (and of course it does not find anything interesting there). The latex exporter seems to find everything in the setup file however, so there must be some mechanism for searching the setup file. If so, it should be possible to crib it and copy it into the beamer exporter. But the devil, as the saying goes, is in the details... Nick