emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Conditional source-block execution based on La TeX document class?


From: James Harkins
Subject: [O] Conditional source-block execution based on La TeX document class?
Date: Sun, 26 Jan 2014 23:44:48 +0800
User-agent: Trojita/v0.3.96-git; Qt/4.8.1; X11; Linux; Ubuntu 12.04.4 LTS

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]