emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Change title and export filename based on code value?


From: Nicolas Goaziou
Subject: Re: [O] Change title and export filename based on code value?
Date: Thu, 09 May 2013 10:23:46 +0200

Hello,

Gary Oberbrunner <address@hidden> writes:

> I'd like to change the title of my report, and the exported pdf filename,
> based on a value I can change in the org-mode source.
>
> I have a source block like this:
>
> #+NAME: reporttype
> #+BEGIN_SRC elisp :results value silent :exports results
> "Foo"
> #+END_SRC
>
> I figured out how to do the title:
>
> #+TITLE My Report: call_reporttype()[:results raw] Results
>
> which is pretty neat (but wasn't easy to figure out, I'll work on that in
> the doc).

Using a macro is another option:

  #+MACRO: my-title Foo
  #+TITLE: My Report: {{{my-title}}} Results

> ...but I'd also like to set the exported PDF filename based on the
> reporttype, but I'm not sure there is an option for that.  Is there?  And
> if there is, is there a way to interpolate my reporttype into it?

No there isn't. Org expects the produced file to sit in the same
directory with a similar name.

You have to rename it yourself after the export.


Regards,

-- 
Nicolas Goaziou



reply via email to

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