Make latex preview also use the packages in `org-export-latex-packages-alist'.

This commit is contained in:
Carsten Dominik 2009-08-16 09:38:03 +02:00
parent 94d91eaf03
commit f7e208da37
3 changed files with 21 additions and 1 deletions

View File

@ -1,5 +1,11 @@
2009-08-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-packages-alist): Fix
customization type.
* org.el (org-create-formula-image): Also use
`org-export-latex-packages-alist'.
* org-html.el (org-export-as-html): Fix bug in footnote regexp.
(org-export-as-html): Format footnotes correctly.

View File

@ -247,7 +247,10 @@ When nil, grouping causes only separation lines between groups."
"Alist of packages to be inserted in the header.
Each cell is of the format \( \"option\" . \"package\" \)."
:group 'org-export-latex
:type 'alist)
:type '(repeat
(list
(string :tag "option")
(string :tag "package"))))
(defcustom org-export-latex-low-levels 'itemize
"How to convert sections below the current level of sectioning.

View File

@ -13984,6 +13984,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
;; This function borrows from Ganesh Swami's latex2png.el
(defun org-create-formula-image (string tofile options buffer)
(require 'org-latex)
(let* ((tmpdir (if (featurep 'xemacs)
(temp-directory)
temporary-file-directory))
@ -14005,7 +14006,17 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
(if (eq bg 'default) (setq bg (org-dvipng-color :background)))
(with-temp-file texfile
(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"))
"")
"\n\\begin{document}\n" string "\n\\end{document}\n"))
(debug)
(let ((dir default-directory))
(condition-case nil
(progn