emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Export LaTeX file to different directory?


From: Richard Lawrence
Subject: [Orgmode] Re: Export LaTeX file to different directory?
Date: Mon, 13 Dec 2010 10:34:29 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hi Joost,

> If I export (part of) an org-mode file to LaTeX, the LaTeX file is created in
> the same directory as the org-mode file. Is there a way to specify the file
> should go somewhere else? Googling and looking through the manual didn't give 
> me
> anything concrete. There is apparently a property EXPORT_FILE_NAME, but 
> setting
> this doesn't seem to have any effect. (Though I may be using it wrong, there
> wasn't any description or example of it in the manual... Plus, I'd like to be
> able to specify just the export directory, not necessarily the file name as 
> well.)

As far as I know (though others may know better) this isn't possible
using per-file configuration with the simple export functions (C-c C-e l
and friends).  It *is* possible through the publishing framework,
though.

When you define a publishing target in org-publish-project-alist, you
can specify both the :base-directory and :publishing-directory options.
For example:

(setq org-publish-project-alist
      '(("orgfiles"
         :base-directory "~/org"
         :publishing-directory "~/tmp"
         :publishing-function org-publish-org-to-html
         :base-extension "org$")))

See the documentation for "Publishing."

This approach, however, requires you to do some Elisp customization, and
it requires you to statically define your source and destination
directories.  You may need something more flexible or configurable on a
per-file (or per-export, even) basis.  The only solution I know of there
is to export to a temporary buffer, then save that buffer in the
location you want -- though of course this requires interaction from
you.

If others know of a middle road between using the publishing framework
and just doing C-c C-e L C-x C-s every time, I would be interested in
hearing about it too.  (If there isn't a middle road, consider this my +1
on adding this feature.)

Best,
Richard




reply via email to

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