Browse Source

ob-org: Padding code block with an empty title on LaTeX export.

* lisp/ob-org.el (org-babel-execute:org): Padding code block with an
  empty title on LaTeX export.
Eric Schulte 10 years ago
parent
commit
e3aeb07a17
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/ob-org.el

+ 2 - 1
lisp/ob-org.el

@@ -46,7 +46,8 @@ This function is called by `org-babel-execute-src-block'."
   (let ((result-params (split-string (or (cdr (assoc :results params)) "")))
 	(body (replace-regexp-in-string "^," "" body)))
     (cond
-     ((member "latex" result-params) (org-export-string body "latex"))
+     ((member "latex" result-params) (org-export-string
+				      (concat "#+Title: \n" body) "latex"))
      ((member "html" result-params)  (org-export-string body "html"))
      ((member "ascii" result-params) (org-export-string body "ascii"))
      (t body))))