Hello, Alex Fenton <alex.fen...@pressure.to> writes:
> One thing that has unfortunately stopped working is my setup for > exporting to pdf, putting all the intermediary (.tex, .aux, .bbl, > etc) and output files in a different directory to the source .org > files. My setup is basically > > project/ > - images/ > - out/ > > with all the .org files in the project base directory. A simple > publishing set-up exported .tex to out/ then called org-latex-compile. > > With 9.0, org-latex-compile hands off to org-compile-file, in which > (as documented) "`default-directory' is set to SOURCE directory during > the whole > process." This means, however, that all the image and bibliograpy > links in the .org files are now broken, since they point to > ./img/foo.png and not ../img/foo.png Honestly, I'm surprised it worked. I'm also surprised it could be related to `default-directory' set-up, since links are created during Org -> LaTeX conversion, whereas `org-compile-file' handles LaTeX -> PDF. What is that "simple publishing set-up" you are talking about? Not that there is not something fishy in `org-compile-file' at the moment (see, e.g., <http://permalink.gmane.org/gmane.emacs.orgmode/110030>), but I cannot see a way out without breaking some eggs. Basically, there are three directories to consider: source (".tex") directory, output (".pdf") directory, and working directory, i.e., probably ".org" file directory. The assumption for `org-compile-file', and before it, `org-latex-compile', is that source and output directories are the same. Hence `org-compile-file' returns an error when (concat out-dir tex-file.pdf) cannot be found. Now, according to `org-latex-pdf-process', some values do not care much about the working directory, e.g., "pdflatex -interaction nonstopmode -output-directory %o %f" but others clearly require the working directory to be the output directory (note the absence of output directory in the command below) "texi2dvi -p -b -V %f" As a consequence, if we do not set `default-directory' to the output directory, the latter is broken. Note that if we do, "%o" place-holder becomes useless as it is always "./". In a nutshell we can either set default-directory to source/output directory or leave it as-is. In all cases, it seems to break something anyway. I'm Cc'ing Joon Ro since he reported a related issue with `org-compile-file'. Comments welcome. Regards, -- Nicolas Goaziou