emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Julien Barnier <julien@no-log.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Dynamix HTML preamble/postamble
Date: Thu, 04 Dec 2008 08:12:44 -0800	[thread overview]
Message-ID: <87skp3dimb.fsf@gmail.com> (raw)
In-Reply-To: <87d4g82eq9.fsf@z.nozav.org> (Julien Barnier's message of "Thu, 04 Dec 2008 15:32:14 +0100")

Julien Barnier <julien@no-log.org> 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

      reply	other threads:[~2008-12-04 16:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 14:32 Dynamix HTML preamble/postamble Julien Barnier
2008-12-04 16:12 ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87skp3dimb.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=julien@no-log.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).