[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Dynamix HTML preamble/postamble
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] Dynamix HTML preamble/postamble |
Date: |
Thu, 04 Dec 2008 08:12:44 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Julien Barnier <address@hidden> writes:
> Hi,
>
> I'm currently migrating a bunch of files from Muse to Org (not that
> Muse was not a good project, but I'd like to minimize the number of
> keyboard shortcuts to remember :-) ).
>
> One thing that I miss in Org is the ability to dynamically generate
> the pramble and postamble during HTML (or LaTeX) export. In muse you
> can provide a lisp function that is evaluated per file and which is
> able to access file options with muse-publishing-directive.
>
> Is there a contrib or a method to do such a thing in Org mode ?
>
Hi Julien,
There is `org-export-preprocess-hook' which is run over your org file
before the file is exported (to latex, html, or ascii).
,----`org-export-preprocess-hook'
| org-export-preprocess-hook is a variable defined in `org-exp.el'.
| Its value is
| (org-export-blocks-preprocess)
|
|
| Documentation:
| Hook for preprocessing an export buffer.
| Pretty much the first thing when exporting is running this hook.
`----
If you add a function to this hook it would have access to the
parameters set in the org file through the `parameters' alist, see
`org-export-preprocess-string' in org-exp.el for more information.
As for changing the preamble and postamble, I don't know if these are
variables which could simply be overridden (which would be nice), or if
you would want to insert these in the buffer inside of #+begin/end_html
blocks.
If you come up with a generally useful function please be sure to share
it.
Good luck -- Eric