mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 17:02:51 +00:00
Make latex preview also use the packages in `org-export-latex-packages-alist'.
This commit is contained in:
parent
94d91eaf03
commit
f7e208da37
|
@ -1,5 +1,11 @@
|
||||||
2009-08-16 Carsten Dominik <carsten.dominik@gmail.com>
|
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-html.el (org-export-as-html): Fix bug in footnote regexp.
|
||||||
(org-export-as-html): Format footnotes correctly.
|
(org-export-as-html): Format footnotes correctly.
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,10 @@ When nil, grouping causes only separation lines between groups."
|
||||||
"Alist of packages to be inserted in the header.
|
"Alist of packages to be inserted in the header.
|
||||||
Each cell is of the format \( \"option\" . \"package\" \)."
|
Each cell is of the format \( \"option\" . \"package\" \)."
|
||||||
:group 'org-export-latex
|
:group 'org-export-latex
|
||||||
:type 'alist)
|
:type '(repeat
|
||||||
|
(list
|
||||||
|
(string :tag "option")
|
||||||
|
(string :tag "package"))))
|
||||||
|
|
||||||
(defcustom org-export-latex-low-levels 'itemize
|
(defcustom org-export-latex-low-levels 'itemize
|
||||||
"How to convert sections below the current level of sectioning.
|
"How to convert sections below the current level of sectioning.
|
||||||
|
|
11
lisp/org.el
11
lisp/org.el
|
@ -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
|
;; This function borrows from Ganesh Swami's latex2png.el
|
||||||
(defun org-create-formula-image (string tofile options buffer)
|
(defun org-create-formula-image (string tofile options buffer)
|
||||||
|
(require 'org-latex)
|
||||||
(let* ((tmpdir (if (featurep 'xemacs)
|
(let* ((tmpdir (if (featurep 'xemacs)
|
||||||
(temp-directory)
|
(temp-directory)
|
||||||
temporary-file-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)))
|
(if (eq bg 'default) (setq bg (org-dvipng-color :background)))
|
||||||
(with-temp-file texfile
|
(with-temp-file texfile
|
||||||
(insert org-format-latex-header
|
(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"))
|
"\n\\begin{document}\n" string "\n\\end{document}\n"))
|
||||||
|
(debug)
|
||||||
(let ((dir default-directory))
|
(let ((dir default-directory))
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(progn
|
(progn
|
||||||
|
|
Loading…
Reference in a new issue