diff --git a/lisp/my/my-org-article.el b/lisp/my/my-org-article.el index e471c16c..f285ab24 100644 --- a/lisp/my/my-org-article.el +++ b/lisp/my/my-org-article.el @@ -1609,6 +1609,39 @@ Uses also `my-org-article-latex-template-value' with async subtreep visible-only body-only ext-plist (lambda (file) (org-latex-compile file))))) +;;;###autoload +(defun my-org-article-latex-publish-to-latex (plist filename pub-dir) + "Publish an Org file to LaTeX. + +FILENAME is the filename of the Org file to be published. PLIST +is the property list for the given project. PUB-DIR is the +publishing directory. + +Return output file name." + (org-publish-org-to 'article-latex filename ".tex" plist pub-dir)) + +;;;###autoload +(defun my-org-article-latex-publish-to-pdf (plist filename pub-dir) + "Publish an Org file to PDF (via LaTeX). + +FILENAME is the filename of the Org file to be published. PLIST +is the property list for the given project. PUB-DIR is the +publishing directory. + +Return output file name." + ;; Unlike to `org-latex-publish-to-latex', PDF file is generated + ;; in working directory and then moved to publishing directory. + (org-publish-attachment + plist + ;; Default directory could be anywhere when this function is + ;; called. We ensure it is set to source file directory during + ;; compilation so as to not break links to external documents. + (let ((default-directory (file-name-directory filename))) + (org-latex-compile + (org-publish-org-to + 'article-latex filename ".tex" plist (file-name-directory filename)))) + pub-dir)) + ;; HTML (org-export-define-derived-backend 'article-html 'tufte-html