aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorCarsten Dominik2007-08-22 11:51:09 +0000
committerCarsten Dominik2007-08-22 11:51:09 +0000
commitdaa89d0f73b4dc1c8ec608c002519349f0c91c61 (patch)
tree0d4ea62d8c322c86a474b4a3660241ba7e88dcfa /lisp
parent48aaad2d38c90e5214b0efa8250e2963401ec3d8 (diff)
downloademacs-daa89d0f73b4dc1c8ec608c002519349f0c91c61.tar.gz
emacs-daa89d0f73b4dc1c8ec608c002519349f0c91c61.zip
* textmodes/org-publish.el (org-publish-org-to-latex): New
function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/textmodes/org-publish.el27
2 files changed, 26 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9ef7f409184..0b45104acb3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12007-08-22 Carsten Dominik <dominik@science.uva.nl> 12007-08-22 Carsten Dominik <dominik@science.uva.nl>
2 2
3 * textmodes/org-export-latex.el: New file.
4
3 * textmodes/org-publish.el (org-publish-org-to-latex): New 5 * textmodes/org-publish.el (org-publish-org-to-latex): New
4 function. 6 function.
5 7
diff --git a/lisp/textmodes/org-publish.el b/lisp/textmodes/org-publish.el
index 5a2a146dbaa..cdfc673b0f3 100644
--- a/lisp/textmodes/org-publish.el
+++ b/lisp/textmodes/org-publish.el
@@ -6,9 +6,11 @@
6;; Keywords: hypermedia, outlines 6;; Keywords: hypermedia, outlines
7;; Version: 1.80 7;; Version: 1.80
8 8
9;; $Id: org-publish.el,v 1.80 2007/03/22 02:31:03 dto Exp dto $
10
9;; This file is free software; you can redistribute it and/or modify 11;; This file is free software; you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by 12;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation; either version 3, or (at your option) 13;; the Free Software Foundation; either version 2, or (at your option)
12;; any later version. 14;; any later version.
13 15
14;; This file is distributed in the hope that it will be useful, 16;; This file is distributed in the hope that it will be useful,
@@ -452,6 +454,27 @@ FILENAME is the filename of the org file to be published."
452 (kill-buffer (current-buffer))))) 454 (kill-buffer (current-buffer)))))
453 455
454 456
457(defun org-publish-org-to-latex (plist filename)
458 "Publish an org file to LaTeX."
459 (org-publish-org-to "latex" plist filename))
460
461(defun org-publish-org-to-html (plist filename)
462 "Publish an org file to HTML."
463 (org-publish-org-to "html" plist filename))
464
465(defun org-publish-org-to (format plist filename)
466 "Publish an org file to FORMAT.
467PLIST is the property list for the given project.
468FILENAME is the filename of the org file to be published."
469 (require 'org)
470 (let* ((arg (plist-get plist :headline-levels)))
471 (progn
472 (find-file filename)
473 (funcall (intern (concat "org-export-as-" format))
474 arg nil plist)
475 (kill-buffer (current-buffer)))))
476
477
455(defun org-publish-attachment (plist filename) 478(defun org-publish-attachment (plist filename)
456 "Publish a file with no transformation of any kind. 479 "Publish a file with no transformation of any kind.
457PLIST is the property list for the given project. 480PLIST is the property list for the given project.
@@ -596,6 +619,4 @@ With prefix argument, force publish all files."
596 619
597 620
598(provide 'org-publish) 621(provide 'org-publish)
599
600;; arch-tag: 72807f3c-8af0-4a6b-8dca-c3376eb25adb
601;;; org-publish.el ends here 622;;; org-publish.el ends here