From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Conditional source-block execution based on LaTeX document class? Date: Sun, 26 Jan 2014 23:44:48 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7Rtj-00074e-Ls for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 10:45:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7Rta-0004dj-Oq for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 10:45:23 -0500 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:61709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7Rta-0004dT-I3 for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 10:45:14 -0500 Received: by mail-pa0-f44.google.com with SMTP id kq14so4998264pab.31 for ; Sun, 26 Jan 2014 07:45:12 -0800 (PST) Received: from localhost ([219.137.188.132]) by mx.google.com with ESMTPSA id x5sm23220063pbw.26.2014.01.26.07.45.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 07:45:11 -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: orgmode Just ran into something that I'm really not sure how to handle. I thought I=20= could handle it with export filters, but actually it involves babel, and=20 that makes it more involved than I initially suspected. I'm working on a large project involving five beamer presentations (one per=20= day), and the sources for these will be combined into one massive=20 beamerarticle document for the workshop attendees' reference. (If they want=20= to print it out, it will look okay, but I won't encourage the killing of=20 trees -- actually my early versions of the article layout looks fine on a=20 tablet.) I'm using LaTeX's glossaries package for indexed references at the end.=20 But, \newglossaryentry is really annoying. So I made some org tables for=20 the glossary entries and I wrote some emacs-lisp src blocks to convert them=20= into the right syntax for LaTeX. So here's the problem... In the individual beamer slideshows, I need to put the \newglossaryentry=20 commands within a frame (because I'm also using beamer's=20 "ignorenonframetext" class option, so that I can have text that appears=20 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=20= 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=20 0x-contents file, then I will have redundant \newglossaryentry commands in=20= 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=20 be able to put the #+call lines into the master file for the article, and=20 then be able to suppress their execution in the #+includes. Ideally, this=20 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=20 lines in, and simply say "no" to the ones I don't want in the final=20 compilation. Thanks, hjh