summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-10-06 17:43:32 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2012-10-06 17:43:32 (GMT)
commitf461a105321a31d1d6369aae42fe534f12c602d1 (patch)
treee68e1f7335bf198b1bb37b98b7d28b305c543334
parentb0938f684ef2794b63fa1830e61320c0f4cc11cf (diff)
downloadorg-mode-f461a105321a31d1d6369aae42fe534f12c602d1.zip
org-mode-f461a105321a31d1d6369aae42fe534f12c602d1.tar.gz
org-e-publish: Fix publishing to PDF
* contrib/lisp/org-e-publish.el (org-e-publish-org-to-pdf): First publish in base directory, then move results to publishing directory. It allows to correctly publish a document with images generated by some Babel code.
-rw-r--r--contrib/lisp/org-e-publish.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/lisp/org-e-publish.el b/contrib/lisp/org-e-publish.el
index 913017c..9fd18ca 100644
--- a/contrib/lisp/org-e-publish.el
+++ b/contrib/lisp/org-e-publish.el
@@ -591,8 +591,14 @@ publishing directory.
Return output file name."
(require 'org-e-latex nil t)
- (org-e-latex-compile
- (org-e-publish-org-to 'e-latex filename ".tex" plist pub-dir)))
+ ;; Unlike to `org-e-publish-org-to-latex', PDF file is generated in
+ ;; base directory and then moved to publishing directory.
+ (org-e-publish-attachment
+ plist
+ (org-e-latex-compile
+ (org-e-publish-org-to
+ 'e-latex filename ".tex" plist (plist-get plist :base-directory)))
+ pub-dir))
(defun org-e-publish-org-to-html (plist filename pub-dir)
"Publish an org file to HTML.