all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Conditional Inclusion
@ 2011-07-05  4:43 Avdi Grimm
  2011-07-05  7:20 ` Rainer M Krug
  0 siblings, 1 reply; 5+ messages in thread
From: Avdi Grimm @ 2011-07-05  4:43 UTC (permalink / raw)
  To: emacs-orgmode

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?

-- 
Avdi Grimm
http://avdi.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Inclusion
  2011-07-05  4:43 Conditional Inclusion Avdi Grimm
@ 2011-07-05  7:20 ` Rainer M Krug
  2011-07-05  9:09   ` Eric S Fraga
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2011-07-05  7:20 UTC (permalink / raw)
  To: avdi; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

On Tue, Jul 5, 2011 at 6:43 AM, Avdi Grimm <groups@inbox.avdi.org> 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.

Cheers,

Rainer


> --
> Avdi Grimm
> http://avdi.org
>
>


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax (F):       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

[-- Attachment #2: Type: text/html, Size: 2019 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Inclusion
  2011-07-05  7:20 ` Rainer M Krug
@ 2011-07-05  9:09   ` Eric S Fraga
  2011-07-05  9:25     ` Rainer M Krug
  0 siblings, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2011-07-05  9:09 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode, avdi

Rainer M Krug <r.m.krug@gmail.com> writes:

> On Tue, Jul 5, 2011 at 6:43 AM, Avdi Grimm <groups@inbox.avdi.org> 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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Inclusion
  2011-07-05  9:09   ` Eric S Fraga
@ 2011-07-05  9:25     ` Rainer M Krug
  2011-07-05 13:42       ` Russell Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2011-07-05  9:25 UTC (permalink / raw)
  To: Rainer M Krug, avdi, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]

On Tue, Jul 5, 2011 at 11:09 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> Rainer M Krug <r.m.krug@gmail.com> writes:
>
> > On Tue, Jul 5, 2011 at 6:43 AM, Avdi Grimm <groups@inbox.avdi.org>
> 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...
>

True. But for both scenarios, you can put all files into one main org file
and tangle the final files needed.

Rainer


>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.5 (release_7.5.574.g5a503)
>



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax (F):       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

[-- Attachment #2: Type: text/html, Size: 2735 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Conditional Inclusion
  2011-07-05  9:25     ` Rainer M Krug
@ 2011-07-05 13:42       ` Russell Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Russell Adams @ 2011-07-05 13:42 UTC (permalink / raw)
  To: emacs-orgmode

I would just use a symlink to the right header.

On Tue, Jul 05, 2011 at 11:25:41AM +0200, Rainer M Krug wrote:
> On Tue, Jul 5, 2011 at 11:09 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> > Rainer M Krug <r.m.krug@gmail.com> writes:
> >
> > > On Tue, Jul 5, 2011 at 6:43 AM, Avdi Grimm <groups@inbox.avdi.org>
> > 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...
> >
>
> True. But for both scenarios, you can put all files into one main org file
> and tangle the final files needed.
>
> Rainer
>
>
> >
> > --
> > : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> > : using Org-mode version 7.5 (release_7.5.574.g5a503)
> >
>
>
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
> UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :       +33 - (0)9 53 10 27 44
> Cell:       +33 - (0)6 85 62 59 98
> Fax (F):       +33 - (0)9 58 10 27 44
>
> Fax (D):    +49 - (0)3 21 21 25 22 44
>
> email:      Rainer@krugs.de
>
> Skype:      RMkrug


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-05 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05  4:43 Conditional Inclusion Avdi Grimm
2011-07-05  7:20 ` Rainer M Krug
2011-07-05  9:09   ` Eric S Fraga
2011-07-05  9:25     ` Rainer M Krug
2011-07-05 13:42       ` Russell Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.