* lisp/ob-latex.el: Add support for :prologue/:epilogue parameters

(org-babel-expand-body:latex):
This commit is contained in:
Ihor Radchenko 2023-10-19 11:59:11 +03:00
parent 92b69d4331
commit f0a2531bb4
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 7 additions and 1 deletions

View File

@ -138,7 +138,13 @@ exporting the literal LaTeX source."
(cdr pair) (format "%S" (cdr pair))) (cdr pair) (format "%S" (cdr pair)))
body))) body)))
(org-babel--get-vars params)) (org-babel--get-vars params))
(org-trim body)) (let ((prologue (cdr (assq :prologue params)))
(epilogue (cdr (assq :epilogue params))))
(org-trim
(concat
(and prologue (concat prologue "\n"))
body
(and epilogue (concat "\n" epilogue "\n"))))))
(defun org-babel-execute:latex (body params) (defun org-babel-execute:latex (body params)
"Execute LaTeX BODY according to PARAMS. "Execute LaTeX BODY according to PARAMS.