From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Conditional source-block execution based on LaTeX document class? Date: Sun, 26 Jan 2014 10:35:13 -0700 Message-ID: <87iot6y2kf.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7VFx-0006lp-Nk for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 14:20:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7VFs-0007K7-2j for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 14:20:33 -0500 Received: from mail-pb0-x22c.google.com ([2607:f8b0:400e:c01::22c]:63662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7VFr-0007K2-Qf for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 14:20:28 -0500 Received: by mail-pb0-f44.google.com with SMTP id rq2so5064692pbb.31 for ; Sun, 26 Jan 2014 11:20:25 -0800 (PST) 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: James Harkins Cc: orgmode Hi James, Maybe you could do something like the following... #+name: export-hdr-arg-backend-dep #+begin_src emacs-lisp (message "do stuff") #+end_src #+call: export-hdr-arg-backend-dep() :exports (if (eq org-export-current-backend 'beamer) "none" "results") Best, James Harkins writes: > Just ran into something that I'm really not sure how to handle. I thought I > could handle it with export filters, but actually it involves babel, and > that makes it more involved than I initially suspected. > > I'm working on a large project involving five beamer presentations (one per > day), and the sources for these will be combined into one massive > beamerarticle document for the workshop attendees' reference. (If they want > to print it out, it will look okay, but I won't encourage the killing of > trees -- actually my early versions of the article layout looks fine on a > tablet.) > > I'm using LaTeX's glossaries package for indexed references at the end. > But, \newglossaryentry is really annoying. So I made some org tables for > the glossary entries and I wrote some emacs-lisp src blocks to convert them > into the right syntax for LaTeX. So here's the problem... > > In the individual beamer slideshows, I need to put the \newglossaryentry > commands within a frame (because I'm also using beamer's > "ignorenonframetext" class option, so that I can have text that appears > only in the article but not the slides). That is (if I have H:3): > > *** Some frame > **** A block > Some text > > #+call: makegloss > #+results: makegloss > > ... then the results of the src block to go into the frame, and then beamer > doesn't ignore them and everything works. > > For the final article, I need a structure like this: > > #+options: H:4 > > * Day 1 > #+include "01-intro/01-contents.org" > > * Day 2 > #+include "02-synthesis/02-contents.org" > > And the problem is, if the #+call commands are replicated in each > 0x-contents file, then I will have redundant \newglossaryentry commands in > the LaTeX output (in the end, multiplied five times). > > If there's no other way, I could live with that, but ideally, I'd like to > be able to put the #+call lines into the master file for the article, and > then be able to suppress their execution in the #+includes. Ideally, this > would be automatic based on the LaTeX document class. > > Any way to do this? I suppose, at worst, I can just put all of the #+call > lines in, and simply say "no" to the ones I don't want in the final > compilation. > > Thanks, > hjh > -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D