Re: [O] BUG(?): #+BINDing org-export-publishing-directory only affects HTML output, not PDF or Babel results
Hi, I fixed this bug. Christian Moe writes: > On 3/8/12 7:38 AM, A. Major wrote: >> Thanks, but the "dir" PROPERTY appears to affect the target directory for >> babel's results, neither the HTML nor the PDF output are influenced that way. > > Yes, that's why I said "this part of the problem". > >> Combining BIND and the "dir" PROPERTY, I can get HTML and babel files in the >> right place, but not the PDF. >> >> Any other suggestions? :) > > Yep. Change three characters in org-latex.el. Problem > solved. Maybe. :) You showed the direction -- thanks! The right fix is to use org-export-latex-options-plist, which is initialized by combining opt-plist (general options for publishing) and ext-plist (local LaTeX options for publishing.) Thanks, -- Bastien
Re: [O] BUG(?): #+BINDing org-export-publishing-directory only affects HTML output, not PDF or Babel results
On 3/8/12 7:38 AM, A. Major wrote: Thanks, but the "dir" PROPERTY appears to affect the target directory for babel's results, neither the HTML nor the PDF output are influenced that way. Yes, that's why I said "this part of the problem". Combining BIND and the "dir" PROPERTY, I can get HTML and babel files in the right place, but not the PDF. Any other suggestions? :) Yep. Change three characters in org-latex.el. Problem solved. Maybe. :) The attached patch addresses a difference between the latex and html exporters, enabling the user to choose a different output directory for latex/PDF export by binding org-export-publishing directory, just as was already possible for html export. If there's a latex user following this thread who understands the ways of the latex exporter, could you have a look to see that it doesn't screw up anything else before I submit a properly formatted patch? Yours, Christian diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 03664b4..759fad4 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -870,7 +870,7 @@ when PUB-DIR is set, use this as the publishing directory." (concat (file-name-as-directory (or pub-dir -(org-export-directory :LaTeX ext-plist))) +(org-export-directory :LaTeX opt-plist))) (file-name-sans-extension (or (and subtree-p (org-entry-get rbeg "EXPORT_FILE_NAME" t)) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 03664b4..759fad4 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -870,7 +870,7 @@ when PUB-DIR is set, use this as the publishing directory." (concat (file-name-as-directory (or pub-dir -(org-export-directory :LaTeX ext-plist))) +(org-export-directory :LaTeX opt-plist))) (file-name-sans-extension (or (and subtree-p (org-entry-get rbeg "EXPORT_FILE_NAME" t))
Re: [O] BUG(?): #+BINDing org-export-publishing-directory only affects HTML output, not PDF or Babel results
Christian Moe christianmoe.com> writes: > > > >>> On Wed, 7 Mar 2012 12:38:48 + (UTC), A Major said: > > > >> Even worse, if the .org file uses Babel to create files (say, in PNG > >> format) as a result (via ditaa, graphviz, etc.), then these files > >> end up in the directory containing the .org file, not in > >> /tmp/export-test, where the HTML file is placed. This leaves the > >> HTML output completely broken. > > IIUC, this part of the problem should be easy to solve with the :dir > header argument? You can set it once for the whole file with: > > #+PROPERTY: dir /tmp/export-test > > Yours, > Christian > > Thanks, but the "dir" PROPERTY appears to affect the target directory for babel's results, neither the HTML nor the PDF output are influenced that way. Combining BIND and the "dir" PROPERTY, I can get HTML and babel files in the right place, but not the PDF. Any other suggestions? :)
Re: [O] BUG(?): #+BINDing org-export-publishing-directory only affects HTML output, not PDF or Babel results
On Wed, 7 Mar 2012 12:38:48 + (UTC), A Major said: > Even worse, if the .org file uses Babel to create files (say, in PNG > format) as a result (via ditaa, graphviz, etc.), then these files > end up in the directory containing the .org file, not in > /tmp/export-test, where the HTML file is placed. This leaves the > HTML output completely broken. IIUC, this part of the problem should be easy to solve with the :dir header argument? You can set it once for the whole file with: #+PROPERTY: dir /tmp/export-test Yours, Christian
Re: [O] BUG(?): #+BINDing org-export-publishing-directory only affects HTML output, not PDF or Babel results
>> On Wed, 7 Mar 2012 12:38:48 + (UTC), A Major said: > Hi, I'm trying to set up my .org file such that export commands > create all results in a certain directory rather than the directory > containing the .org file. So I've added the option > #+BIND: org-export-publishing-directory "/tmp/export-test" > at the beginning of the file, which seems to work fine for a simple > test file with HTML export. > If I try to export the .org file as a PDF document, however, the > result still resides in the directory containing the .org file -- > which isn't what I want and is also counterintuitive given the name > of the variable set in the BIND option. Hi András, For pdf export, I have ended up using cmake to do an out-of-source build [1] so all the files that latex produces go in one, expendable directory and the original directory (under git management) remains free of clutter. It is a little complicated though. I dream that one day maybe org will be able to tangle its own CMakeLists.txt on export. > Even worse, if the .org file uses Babel to create files (say, in PNG > format) as a result (via ditaa, graphviz, etc.), then these files > end up in the directory containing the .org file, not in > /tmp/export-test, where the HTML file is placed. This leaves the > HTML output completely broken. > Is there a proper way of doing this (short of "publishing", which > isn't what I want because I find it too complex in my case), and am > I doing something very wrong here? > Thanks, > András Myles Footnotes: [1] http://www.cmake.org/Wiki/CMakeUserUseLATEX
[O] BUG(?): #+BINDing org-export-publishing-directory only affects HTML output, not PDF or Babel results
Hi, I'm trying to set up my .org file such that export commands create all results in a certain directory rather than the directory containing the .org file. So I've added the option #+BIND: org-export-publishing-directory "/tmp/export-test" at the beginning of the file, which seems to work fine for a simple test file with HTML export. If I try to export the .org file as a PDF document, however, the result still resides in the directory containing the .org file -- which isn't what I want and is also counterintuitive given the name of the variable set in the BIND option. Even worse, if the .org file uses Babel to create files (say, in PNG format) as a result (via ditaa, graphviz, etc.), then these files end up in the directory containing the .org file, not in /tmp/export-test, where the HTML file is placed. This leaves the HTML output completely broken. Is there a proper way of doing this (short of "publishing", which isn't what I want because I find it too complex in my case), and am I doing something very wrong here? Thanks, András