Function: org-latex-packages-to-string
org-latex-packages-to-string is a byte-compiled function defined in
org.el.gz.
Signature
(org-latex-packages-to-string PKG &optional SNIPPETS-P NEWLINE)
Documentation
Turn an alist of packages into a string with the \usepackage macros.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-latex-packages-to-string (pkg &optional snippets-p newline)
"Turn an alist of packages into a string with the \\usepackage macros."
(setq pkg (mapconcat (lambda(p)
(cond
((stringp p) p)
((and snippets-p (>= (length p) 3) (not (nth 2 p)))
(format "%% Package %s omitted" (cadr p)))
((equal "" (car p))
(format "\\usepackage{%s}" (cadr p)))
(t
(format "\\usepackage[%s]{%s}"
(car p) (cadr p)))))
pkg
"\n"))
(if newline (concat pkg "\n") pkg))