فهرست منبع

New hook `org-export-latex-final-hook'.

Carsten Dominik 15 سال پیش
والد
کامیت
a81e918325
2فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 2 0
      lisp/ChangeLog
  2. 4 0
      lisp/org-latex.el

+ 2 - 0
lisp/ChangeLog

@@ -2,6 +2,8 @@
 
 	* org-latex.el (org-export-latex-treat-sub-super-char): Allow a
 	space character as the character before the ^/_.
+	(org-export-latex-final-hook): New hook.
+	(org-export-as-latex): Run `org-export-latex-final-hook'.
 
 2009-09-28  Carsten Dominik  <carsten.dominik@gmail.com>
 

+ 4 - 0
lisp/org-latex.el

@@ -410,6 +410,9 @@ These are the .aux, .log, .out, and .toc files."
 (defvar org-export-latex-after-blockquotes-hook nil
   "Hook run during LaTeX export, after blockquote, verse, center are done.")
 
+(defvar org-export-latex-final-hook nil
+  "Hook run in the finalized LaTeX buffer.")
+
 ;;; Autoload functions:
 
 ;;;###autoload
@@ -662,6 +665,7 @@ when PUB-DIR is set, use this as the publishing directory."
       (and (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t)
 	   (replace-match "\\tableofcontents" t t)))
 
+    (run-hooks 'org-export-latex-final-hook)
     (or to-buffer (save-buffer))
     (goto-char (point-min))
     (or (org-export-push-to-kill-ring "LaTeX")