From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Alex Fenton <alex.fenton@pressure.to>
Cc: Joon Ro <joon.ro@outlook.com>, emacs-orgmode@gnu.org
Subject: Re: latex exporting to different directory with v9.0
Date: Sat, 05 Nov 2016 23:54:43 +0100 [thread overview]
Message-ID: <874m3lo7v0.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <36258fcb-bc34-6517-2bc6-919722c3e72f@pressure.to> (Alex Fenton's message of "Sat, 5 Nov 2016 12:54:20 +0100")
Hello,
Alex Fenton <alex.fenton@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
next prev parent reply other threads:[~2016-11-05 22:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-05 11:54 latex exporting to different directory with v9.0 Alex Fenton
2016-11-05 22:54 ` Nicolas Goaziou [this message]
2016-11-06 11:39 ` Alex Fenton
2016-11-08 17:49 ` Nicolas Goaziou
2016-11-10 16:30 ` Alex Fenton
2016-11-11 9:26 ` Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874m3lo7v0.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=alex.fenton@pressure.to \
--cc=emacs-orgmode@gnu.org \
--cc=joon.ro@outlook.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.