summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-10-26 17:00:28 -0600
committerEric Schulte <schulte.eric@gmail.com>2010-10-26 17:00:28 -0600
commitc52ccaefa7a6a68ec04427afa615da273babf198 (patch)
tree008576dd109c4b7bb96ee781df0472f0f7e11987
parent7635429d44db66cb5a681c6fca4de4893cd43dbd (diff)
downloadorg-mode-c52ccaefa7a6a68ec04427afa615da273babf198.tar.gz
adding new :headers header argument for latex code blocks
* lisp/ob-latex.el (org-babel-execute:latex): adding new :headers header argument for latex code blocks
-rw-r--r--lisp/ob-latex.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el
index ca092f6..6f92063 100644
--- a/lisp/ob-latex.el
+++ b/lisp/ob-latex.el
@@ -75,6 +75,7 @@ This function is called by `org-babel-execute-src-block'."
(fit (or (cdr (assoc :fit params)) border))
(height (and fit (cdr (assoc :pdfheight params))))
(width (and fit (cdr (assoc :pdfwidth params))))
+ (headers (cdr (assoc :headers params)))
(in-buffer (not (string= "no" (cdr (assoc :buffer params)))))
(org-export-latex-packages-alist
(append (cdr (assoc :packages params))
@@ -102,6 +103,12 @@ This function is called by `org-babel-execute-src-block'."
(if border (format "\\setlength{\\PreviewBorder}{%s}" border) "")
(if height (concat "\n" (format "\\pdfpageheight %s" height)) "")
(if width (concat "\n" (format "\\pdfpagewidth %s" width)) "")
+ (if headers
+ (concat "\n"
+ (if (listp headers)
+ (mapconcat #'identity headers "\n")
+ headers) "\n")
+ "")
(if org-format-latex-header-extra
(concat "\n" org-format-latex-header-extra)
"")