emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Dynamix HTML preamble/postamble
@ 2008-12-04 14:32 Julien Barnier
  2008-12-04 16:12 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Barnier @ 2008-12-04 14:32 UTC (permalink / raw)
  To: emacs-orgmode

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 ?

Thanks in advance for any answer, and thanks for this *great* Emacs
mode !

Sincerely,

-- 
Julien

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

* Re: Dynamix HTML preamble/postamble
  2008-12-04 14:32 Dynamix HTML preamble/postamble Julien Barnier
@ 2008-12-04 16:12 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2008-12-04 16:12 UTC (permalink / raw)
  To: Julien Barnier; +Cc: emacs-orgmode

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

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

end of thread, other threads:[~2008-12-04 16:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 14:32 Dynamix HTML preamble/postamble Julien Barnier
2008-12-04 16:12 ` Eric Schulte

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).