Browse Source

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
Eric Schulte 9 years ago
parent
commit
c52ccaefa7
1 changed files with 7 additions and 0 deletions
  1. 7 0
      lisp/ob-latex.el

+ 7 - 0
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)
 	       "")