babel: org-babel-latex adjusts to the new org latex setup

This commit is contained in:
Eric Schulte 2010-04-07 22:43:37 -06:00
parent e48b8bf577
commit caaf755192
1 changed files with 7 additions and 10 deletions

View File

@ -81,16 +81,13 @@ called by `org-babel-execute-src-block'."
(defun org-babel-latex-body-to-tex-file (tex-file body &optional height width)
"Extracted from `org-create-formula-image' in org.el."
(with-temp-file tex-file
(insert org-format-latex-header
(if org-export-latex-packages-alist
(concat "\n"
(mapconcat (lambda(p)
(if (equal "" (car p))
(format "\\usepackage{%s}" (cadr p))
(format "\\usepackage[%s]{%s}"
(car p) (cadr p))))
org-export-latex-packages-alist "\n"))
"")
(insert (org-splice-latex-header
org-format-latex-header
(remove-if
(lambda (el) (and (listp el) (string= "hyperref" (cadr el))))
org-export-latex-default-packages-alist)
org-export-latex-packages-alist
org-format-latex-header-extra)
(if height (concat "\n" (format "\\pdfpageheight %s" height)) "")
(if width (concat "\n" (format "\\pdfpagewidth %s" width)) "")
(if org-format-latex-header-extra