From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Conditional Inclusion Date: Tue, 05 Jul 2011 10:09:25 +0100 Message-ID: <87pqlpjdq2.fsf@pinto.chemeng.ucl.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe1dQ-0004wx-4K for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 05:09:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qe1dN-0006PT-TH for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 05:09:35 -0400 Received: from vscani-e.ucl.ac.uk ([144.82.108.33]:53670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe1dN-0006PC-Do for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 05:09:33 -0400 In-Reply-To: (Rainer M. Krug's message of "Tue, 5 Jul 2011 09:20:32 +0200") 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: Rainer M Krug Cc: emacs-orgmode , avdi@avdi.org Rainer M Krug writes: > On Tue, Jul 5, 2011 at 6:43 AM, Avdi Grimm wrote: > >> I'm trying to produce two slightly different PDF versions from the >> same document. >> >> I want to be able to conditionally include a few LaTeX_HEADER lines >> when I publish an Org file. I need to do it in a way I can control >> from the command line when I run the export in batch mode. So I need >> to either enable the lines with some eval-ed lisp on the emacs command >> line, or with an environment variable. >> >> Thoughts on the best way to go about this? >> > > If you are doing it from batch mode, one non-org approach would be to have > the conditional headers in two different files (say header1.tex, > header2.tex) and depending which ones you wantt, you could copy them into a > file header.tex, which is then when exporting included in the document. > > Non-org, but very flexible. or, if you want to do this from org, turn this around and have two main org files, both of which #+include the one with all the common text? then export the main file you want... -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.574.g5a503)